939. Partisan Nim

Two players A and B are playing a variant of Nim.
At the beginning, there are several piles of stones. Each pile is either at the side of A or at the side of B. The piles are unordered.

They make moves in turn. At a player's turn, the player can

The winner is the player who removes the last stone.

Let E(N) be the number of initial settings with at most N stones such that, whoever plays first, A always has a winning strategy.

For example E(4)=9; the settings are:

Nr.Piles at the side of APiles at the side of B
14none
21,3none
32,2none
41,1,2none
531
61,21
721,1
83none
92none

Find E(5000)mod1234567891.

939. 不公平尼姆游戏

A、B 两位玩家正在玩一个变种尼姆游戏。游戏开始时,他们面前有若干堆无序的石子,每堆石子要么在靠 A 的一侧、要么在靠 B 的一侧。

他们轮流进行操作。轮到某玩家操作时,他可以

移除最后一颗石子的人获胜。

E(N) 为满足如下条件的初始状态的数量:共含有 N 颗石子且能使得先手有必胜策略。例如 E(4)=9,这 9 个初始状态是:

序号在 A 这侧的石子堆在 B 这侧的石子堆
14
21,3
32,2
41,1,2
531
61,21
721,1
83
92

E(5000)mod1234567891 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。