Yes this is correct. On Sun, May 8, 2011 at 3:47 AM, keshav agarwal <[email protected]> wrote: > please tell me of my logic was correct or i just got lucky to get it correct > > if xor to a list of nos. is zero only then the division is possible > in this case patrick can be given the one candy with lowest value while sean > keeps the rest > > if xor(n nos.)=0 > then (nth no.) xor (xor of n-1 nos.)=0 > > so patrick gets the nth candy and sean keeps the rest > > -- > 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.
