欧拉计划 发表于 2017-1-13 16:25:34

题目260:石头游戏

本帖最后由 欧拉计划 于 2017-1-13 16:42 编辑

Stone Game

A game is played with three piles of stones and two players.
At her turn, a player removes one or more stones from the piles. However, if she takes stones from more than one pile, she must remove the same number of stones from each of the selected piles.

In other words, the player chooses some N>0 and removes:


[*]N stones from any single pile; or
[*]N stones from each of any two piles (2N total); or
[*]N stones from each of the three piles (3N total).

The player taking the last stone(s) wins the game.
A winning configuration is one where the first player can force a win.
For example, (0,0,13), (0,11,11) and (5,5,5) are winning configurations because the first player can immediately remove all stones.

A losing configuration is one where the second player can force a win, no matter what the first player does.
For example, (0,1,2) and (1,3,3) are losing configurations: any legal move leaves a winning configuration for the second player.

Consider all losing configurations (xi,yi,zi) where xi ≤ yi ≤ zi ≤ 100.
We can verify that Σ(xi+yi+zi) = 173895 for these.

Find Σ(xi+yi+zi) where (xi,yi,zi) ranges over the losing configurations
with xi ≤ yi ≤ zi ≤ 1000.


题目:

有一个由三堆石头和两个玩家组成的游戏。

在她的回合中,一个玩家可以从堆中移走一个或多个石头。然而,如果她从多个堆中取石头,那么她必须在所选的堆中取相同数目的石头。

换句话说,玩家选择 N>0 并移走:


[*]从一个堆中移走 N 个石头;或者
[*]从两个堆中各移走 N 个石头(一共 2N 个石头); 或者
[*]从三个堆中各移走 N 个石头(一共3N个石头)。


移走最后一个石头的玩家获胜。
必胜状态 是指第一个玩家必胜的状态。
例如,(0,0,13),(0,11,11) 和 (5,5,5) 是必胜状态因为第一个玩家会立即移走所有石头。

必败状态 是指第二个玩家必胜的状态,无论第一个玩家怎么做。
例如,(0,1,2) 和 (1,3,3) 是必败状态:任何合法的动作将为第二个玩家留下必胜状态。

考虑所有的必败状态 (xi,yi,zi) 其中 xi ≤ yi ≤ zi ≤ 100,我们可以证明 Σ(xi+yi+zi) = 173895。

求 Σ(xi+yi+zi) 其中 (xi,yi,zi) 属于必败状态并且 xi ≤ yi ≤ zi ≤ 1000。


页: [1]
查看完整版本: 题目260:石头游戏