摘要:
The trick of this problem is.. Adding 1+ coins to one pile, means nothing - you add one, then i just remove it.. so it is back to original game. So, b 阅读全文
摘要:
A simple NIM game in disguise: move 1 coin to one of previous slot, equals to removing.. Then no surprise, Sprague-Grundy theorem solves the problem. 阅读全文
摘要:
Another easy one solved by Sprague-Grundy theorem. Each pile is a sub-game, so you need to XOR SG value of all substates - since you can move # of 1 - 阅读全文