![](https://img-blog.csdnimg.cn/20190918135101160.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
博弈
lonely_wind_
路漫漫兮
展开
-
牛客练习赛67 C-牛牛爱博弈(SG打表)
题目链接:https://ac.nowcoder.com/acm/contest/6885/C博客园食用链接:https://www.cnblogs.com/lonely-wind-/p/13507910.html题目描述牛牛和牛妹玩博弈游戏。牛牛:我们来玩取石子游戏。一共有n堆石子,每个人每次可以取1或2颗石子,谁取走了最后一颗石子就算谁获胜。牛妹:这游戏太无聊了。牛牛:那改一改。一共有n堆石子,每个人每次可以取1,2,4,8,...2k1,2,4,8,...2^k1,2,4,8,...2k颗原创 2020-08-15 11:05:12 · 407 阅读 · 0 评论 -
Codeforces 595C-Warrior and Archer(思维博弈)
题目链接:https://codeforces.com/problemset/problem/595/C博客园食用链接: https://www.cnblogs.com/lonely-wind-/p/13444856.htmlIn the official contest this problem has a different statement, for which jury’s solution was working incorrectly, and for this reason it was原创 2020-08-06 10:52:00 · 393 阅读 · 0 评论 -
Integer Game --UVA11489整数游戏(简单博弈)
UVA - 11489题目链接https://vjudge.net/contest/321024#problem/JTwo players, S and T, are playing a game where they make alternate moves. S plays first.In this game, they start with an integer N. In ...原创 2019-08-19 20:53:02 · 515 阅读 · 0 评论 -
HDU1847--Good Luck in CET-4 Everybody!(博弈之简单SG函数套用)
Good Luck in CET-4 Everybody!Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1847Problem Description大学英语四级考试就要来...原创 2019-08-19 23:07:03 · 268 阅读 · 0 评论 -
HDU1848--Fibonacci again and again(多堆石子的SG简单模型)
Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1848Problem Description任何一个大学生对菲波那契...原创 2019-08-20 00:20:55 · 244 阅读 · 0 评论 -
HDU1536--S-Nim(SG函数与时间优化)
S-NimTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1536Problem DescriptionArthur and his sister Caroll have b...原创 2019-08-20 02:05:53 · 318 阅读 · 0 评论 -
Playing With Stones--UVALive5059石子游戏(超级石子堆的SG找规律)
UVALive - 5059题目链接https://vjudge.net/contest/321177#problem/AYou and your friend are playing a game in which you and your friend take turns removing stones from piles. Initially there are N piles...原创 2019-08-20 11:58:14 · 388 阅读 · 0 评论 -
洛谷P1247 取火柴游戏---对于Nim的SG函数的深入理解
题目链接https://www.luogu.org/problem/P1247题目描述输入k及k个整数n1,n2,…,nk,表示有k堆火柴棒,第i堆火柴棒的根数为ni;接着便是你和计算机取火柴棒的对弈游戏。取的规则如下:每次可以从一堆中取走若干根火柴,也可以一堆全部取走,但不允许跨堆取,也不允许不取。谁取走最后一根火柴为胜利者。例如:k=2,n1=n2=2,A代表你,P代表计算机,...原创 2019-08-20 20:20:05 · 416 阅读 · 0 评论