Today I've solved this problem Vertical Rooks . This is Nim , but you can also add some stones , in editorial it's written that that's no difference because if someone adds some stones , you can by the way reduce the heap by the same number of stones . (That's intuitive : every time opponent adds some stones , I can decrease the number and It will be the same state . At some time he will be bored and I will win with optimal play . ) But I think it isn't correct . [my solution] in spite of we can add some stones to the heap . Grundy number of one heap will be same g(x) = x , so it's also nim.Is is correct?