Oh! Since the question is about bitwise exclusive or, I should have used a language that implements exclusive or! Wish I had thought about that during the contest. On 10 May 2011 02:45, "Douglas Drumond" <[email protected]> wrote: > On Mon, May 9, 2011 at 17:44, Marcelo Ramires > <[email protected]>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 [email protected]. > To unsubscribe from this group, send email to [email protected]. > For more options, visit this group at http://groups.google.com/group/google-code?hl=en. >
-- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
