Odd and Even are playing a game with
The game begins with the
Odd's turn: Odd may choose any pile with an odd number of cookies, eat one and divide the remaining (if any) into two equal piles.
Even's turn: Even may choose any pile with an even number of cookies, eat two of them and divide the remaining (if any) into two equal piles.
The player that does not have a valid move loses the game.
Let
For example,
You are also given
Find
小奇和小偶正用
随后,由小奇先手,二人轮流进行操作:
在小奇的回合中,他可以选择含奇数片曲奇的一堆曲奇,吃掉其中一片曲奇后,将该堆中剩余的曲奇均分成两堆。
在小偶的回合中,他可以选择含偶数片曲奇的一堆曲奇,吃掉其中两片曲奇后,将该堆中剩余的曲奇均分成两堆。
无法行动的玩家落败。
记:将
已知
求
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。