鱼C论坛

 找回密码
 立即注册
查看: 2614|回复: 0

题目260:石头游戏

[复制链接]
发表于 2017-1-13 16:25:34 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 欧拉计划 于 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。


想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-12-22 18:53

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表