kumar anurag <anurag.it.jolly@...> writes: > > > find xor of all elements - if its equal to zeo then Case has solution otherwise NOfor finding the soltuion just sort all the elements and find the (sum of all -sum of smallest).. > On Sun, May 8, 2011 at 9:50 PM, Kunal Patil <kp101090- re5jqeeqqe8avxtiumw...@public.gmane.org> wrote:Can anybody tell me How to solve candy splitting problem appeared in Google Code Jam Qualification round? > I know there is solution, if XOR of all elements comes to be zero.But i wasn't able to proceed from there as I couldn't think of way how to partition that elements. > (I have read solutions from other contestants but as expected they are dirty for the one who doesn't know logic behind program)So plz help... > > > Nice and simple logic!!! Struggled for 2 hours... I didnt get this clue...
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.