I got AC , But i am not sure if i have the right logic
1.I considered the coins in each box to be individual
2.every coin at an index can be treated as a pile of coin problem of height k where k is the index at which the coin is present
3 . if the number of coins in a box is even then we ignore it
4 . if the number of coins in a box is odd then we do
answer = answer^k , where k is the index of that box(since all the coins in that box have same grundy number = k , there XOR will evaluate to k only ).
5. finally if the answer = 0 , then lose else win
please tell me if I have the right logic : )