On Mon, May 9, 2011 at 17:44, Marcelo Ramires
<marcelo.f.rami...@gmail.com>wrote:

> I understood how to solve this, but *how does one come to this solution ?*
> *
> If the xor of all numbers is zero, you can pick any candy, and the xor to
> this number is going to be equal to the xor from the rest of them.*
>
>
For me, I got this when I was trying to understand how Patrick did binary
arithmetic. I added two numbers by hand, and noticed it was, in fact, a xor.
That moment also drove my choice of language.


Douglas Drumond

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to google-code@googlegroups.com.
To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to