ACM-博弈
寻找星空的孩子
CSDN博客首页:http://blog.csdn.net/u010579068?viewmode=list
博客园地址:http://www.cnblogs.com/yuyixingkong/
展开
-
取石子游戏(hdu2516+FIB博弈)
G - 取石子游戏Description1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出"Second win".先取者胜输出"First win". Description1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过原创 2015-08-08 11:04:47 · 1036 阅读 · 1 评论 -
取(2堆)石子游戏(威佐夫博弈+hdu2177)
Problem Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。如果你胜,你第1次怎样取子?原创 2015-08-05 23:38:17 · 1011 阅读 · 1 评论 -
Calendar Game(找规律+博弈)
A - Calendar GameTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 1024Appoint description: System Crawler (2015-08-02)Descrip原创 2015-08-05 15:24:28 · 1551 阅读 · 1 评论 -
取石子游戏(hdu1527+威佐夫博弈)
Problem Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。如果你胜,你第1次怎样取子?原创 2015-08-05 23:21:08 · 1062 阅读 · 1 评论 -
邂逅明下(巴什博弈+hdu2897)
H - 邂逅明下Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u每行有三个数字n,p,q,表示一堆硬币一共有n枚,从这个硬币堆里取硬币,一次最少取p枚,最多q枚,如果剩下少于p枚就要一次取完。两人轮流取,直到堆里的硬币取完,最后一次取硬币的算输。对于每一行的三个数字,给出先取的人是否有必胜策略,如果有回答WIN,否则回答LOST。原创 2015-08-06 11:19:47 · 923 阅读 · 1 评论 -
Fibonacci again and again(hdu1848+SG打表)
Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6170 Accepted Submission(s): 2574Problem Description任何原创 2015-08-04 21:36:41 · 1532 阅读 · 1 评论 -
博弈之——SG模板(hdu1848&&hdu1536)
很久没搞博弈了。先来写个模板: 现在我们来研究一个看上去似乎更为一般的游戏:给定一个有向无环图和一个起始顶点上的一枚棋子,两名选手交替的将这枚棋子沿有向边进行移动,无法移动者判负。事实上,这个游戏可以认为是所有Impartial Combinatorial Games的抽象模型。也就是说,任何一个ICG都可以通过把每个局面看成一个顶点,对每个局面和它的子局面连一条有向边来抽象原创 2015-08-04 21:51:14 · 651 阅读 · 1 评论 -
Integer Game(UVA11489)3的倍数
K - Integer GameTime Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 11489 题意:在n中取数字,使剩下的数是3的倍数,不能取则失败。思路:如果能使当前数为3的倍数,数字和必是3的倍数。原创 2015-06-10 21:06:25 · 1045 阅读 · 0 评论 -
SG Value
SG ValueTime Limit: 5 Sec Memory Limit: 256 MBSubmit: 163 Solved: 45[Submit][Status][Web Board]DescriptionThe SG value of a set (multiset) is the minimum positive integer that could no原创 2015-04-04 21:37:07 · 808 阅读 · 0 评论 -
Alice and Bob(博弈)
Alice and BobTime Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KBTotal submit users: 20, Accepted users: 10Problem 11499 : No special judgementProblem descriptio原创 2015-03-23 11:30:50 · 879 阅读 · 0 评论 -
Beans Game(博弈 | | DP)zoj 3057
Beans GameTime Limit: 5 Seconds Memory Limit: 32768 KBThere are three piles of beans. TT and DD pick any number of beans from any pile or the same number from any two piles by turns. Who get the las原创 2015-03-23 11:30:10 · 750 阅读 · 0 评论 -
Nim or not Nim?(hdu3032+SG函数)取走-分割游戏,经典
Nim or not Nim?DescriptionNim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects provided they all com原创 2015-08-08 11:47:49 · 1544 阅读 · 1 评论 -
S-Nim(hdu1536+SG函数)
S-NimTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5317 Accepted Submission(s): 2288Problem DescriptionArthur and his sister原创 2015-08-04 21:41:44 · 2840 阅读 · 2 评论