Hello Can anybody kindly upload prob C output or let me know how my output is wrong ? Am sure my logic is right. [Comparing xor's of the 2 divided group such that they are same and printing highest such possible sum as value] Reg, robin.
On Sun, May 8, 2011 at 12:50 PM, vivek dhiman <[email protected]>wrote: > Lucky! > > You are right. > > if xor of two lists is same. (say xor1 = xo2) > > So the exor of these two wil be 0 (xor (xor1,xor2) = 0) > Or in other words lists can be divided if the xor of all the elements is > zero. > > :) > > > > > On Sun, May 8, 2011 at 8:17 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. >> > > > > -- > Regards > Vivek Dhiman > > -- > 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.
OutputC
Description: Binary data
