Problem 900
DistribuNim II
Two players play a game with at least two piles of stones. The players alternately take stones from one or more piles, subject to:
- the total number of stones taken is equal to the size of the smallest pile before the move;
- the move cannot take all the stones from a pile.
The player that is unable to move loses.
For example, if the piles are of sizes
Let
Define
Find
分布式取石子游戏(二)
两位玩家在玩一个游戏,游戏开始时有至少两堆石子,玩家轮流从一堆或多堆中取石子,并需遵守以下规则:
- 取走的石子总数等于行动前最小堆的石子数量;
- 不能将任何一堆的石子全部取完。
首先无法行动的玩家输掉游戏。
例如,如果堆的大小分别为
令
定义
求
Gitalking ...