How does xor gives solution here?
Because xor is same as the nim addition of digits 0 and 1!
@ks3rr My intuition said to xor it , but I didn’t . FML
Have a look at Spargue-Grundy Theorm
xor is fun!
Can you tell when will we get the original ranklist ? It has frozen like forever
I know its a modification of game of nim… but why xoring it with pile size -1?..
I mean how does it ensure the dividing into two part…
and what if we can divide one pile into k piles…how does it change the solution?
Maybe since 1 pile cannot be broken again…just considering pile size to be pile size -1 in the game of nim does the trick? Is it? And then if we have to break into k piles …answer can be determined by xoring with
pile size -k+1?