ACM—博弈
随心丶而遇
lz太懒,所以没有介绍。
展开
-
SG函数模板
///s[]:可以取走的石子个数///sg[]:0~n的SG函数值///hash[]:mex{}///N位求解范围int s[N],sg[N],Hash[N];void getSG(int n)///n为s的长度{ int i,j; memset(sg,0,sizeof(sg)); for(i=1;i<=n;i++) {原创 2016-07-20 16:24:37 · 1563 阅读 · 0 评论 -
hdu4315 Climbing the Hill(阶梯博弈)
Climbing the HillTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1218 Accepted Submission(s): 548Problem DescriptionAlice and Bob原创 2016-08-06 15:14:22 · 1310 阅读 · 0 评论 -
poj3480 John (nim博弈变形--SJ定理)
JohnTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2940 Accepted: 1432DescriptionLittle John is playing very funny game with his younger brother. There原创 2016-08-05 16:09:13 · 1322 阅读 · 0 评论 -
hdu2177 取(2堆)石子游戏 (威佐夫博弈)
取(2堆)石子游戏Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2054 Accepted Submission(s): 1238Problem Description有两堆石子,数量任意,可以不同。游戏原创 2016-08-05 00:12:28 · 1081 阅读 · 2 评论 -
hdu2176 取(m堆)石子游戏(nim博弈)
取(m堆)石子游戏Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2713 Accepted Submission(s): 1617Problem Descriptionm堆石子,两人轮流取.只能在1堆中取.取原创 2016-08-05 00:07:55 · 815 阅读 · 0 评论 -
hdu1850 Being a Good Boy in Spring Festival(nim博弈)
Being a Good Boy in Spring FestivalTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6682 Accepted Submission(s): 4039Problem Descr原创 2016-08-05 00:04:29 · 1306 阅读 · 1 评论 -
hdu3951 Coin Game(简单博弈)
Coin GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1627 Accepted Submission(s): 936Problem DescriptionAfter hh has learne原创 2016-08-05 00:00:45 · 1610 阅读 · 0 评论 -
hdu3032 Nim or not Nim?(SG函数)
Nim or not Nim?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1710 Accepted Submission(s): 845Problem DescriptionNim is a two-原创 2016-08-04 23:54:52 · 722 阅读 · 0 评论 -
HDU 1536 S-Nim (SG函数)
S-NimTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6364 Accepted Submission(s): 2712Problem DescriptionArthur and his sister原创 2016-07-20 16:33:43 · 1631 阅读 · 0 评论 -
poj1704 Georgia and Bob(阶梯博弈)
Georgia and BobTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9291 Accepted: 3021DescriptionGeorgia and Bob decide to play a self-invented game. They原创 2016-08-06 15:30:03 · 2887 阅读 · 0 评论