博弈问题
博弈问题
Wanidde
本人很懒,什么都没有留下 ^_^
展开
-
POJ 1740 - A New Stone Game (Nim博弈变形)
Alice and Bob decide to play a new stone game.At the beginning of the game they pick n(1<=n<=10) piles of stones in a line. Alice and Bob move the stones in turn. At each step of the game,the pl...原创 2018-07-19 10:18:16 · 170 阅读 · 0 评论 -
POJ 2234 - Matches Game (尼姆博奕(Nimm Game))
Here is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one can choose a pile and take away arbitrary number of matches from...原创 2018-07-19 10:31:23 · 211 阅读 · 0 评论 -
HDU 1527 - 取石子游戏 (威佐夫博奕(Wythoff Game))
有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。 Input 输入包含若干行,表示若干种石子的初始情况,其中每一行包含两个非负整数a和b,表示两堆石...原创 2018-07-19 11:13:54 · 126 阅读 · 0 评论 -
博弈问题
一、尼姆博奕(Nimm Game): 有N堆石头,每堆石头数目在1到100之间,最多有10堆.两人分别取走石头.取石头的规则是:每次只能从1堆中取,每次取走至少1个。取过后还可以把这堆的石头任意分配到其它石子数不为0的堆上,当然也可以不分配。问给定这些石头堆的情况,两人轮流取,谁取走最后一个石子谁胜利,问是先取的胜利还是后取的胜利.双方最优策略。 POJ - 2234 ...原创 2018-07-19 11:46:37 · 530 阅读 · 0 评论 -
POJ 1082 - Calendar Game
Adam and Eve enter this year's ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this contest. This game consists of the dates from January...原创 2018-07-19 16:23:32 · 162 阅读 · 0 评论