
组合游戏 博弈
永夜莫明
菜是原罪
展开
-
poj-2425 A Chess Game (SG函数模板)
Let’s design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topological graph, i.e. th...原创 2018-12-23 15:05:42 · 284 阅读 · 0 评论 -
hdu-5754 Life Winner Bo(混合博弈)
Bo is a “Life Winner”.He likes playing chessboard games with his girlfriend G.The size of the chessboard is N×MN×M.The top left corner is numbered(1,1)(1,1)and the lower right corner is numberd (N,...原创 2018-12-23 16:36:08 · 194 阅读 · 0 评论 -
博弈整理
巴什博弈只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。n%(m+1)==0,则后手胜利反巴什博弈只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者输(n-1)%(m+1)==0,则后手胜利Nim博弈通常的Nim游戏的定义是这样的:有若干堆石子,每堆石子的数量都是有限的,合法的移动是“选择一堆石子并拿...原创 2018-12-23 16:57:55 · 219 阅读 · 0 评论 -
+1学姐玩跳棋 (SG函数)
+1学姐玩跳棋Description 拥有复读机buff的+1学姐一路顺利,现在已经来到了最后一个关卡——跳棋大作战,该关卡有三个BOSS,分别是Gevjon,Tyr和Hoder。战斗规则是,在1*n的棋盘上,从左到右依次标号为1,2,3……n-1,n。跳棋起初放在最左端,即位置1上。+1学姐和BOSS轮流进行一次操作,以一定的规则向右挪动棋子,将棋子恰好挪到最右端,即位置n上的人...原创 2019-01-18 22:28:39 · 379 阅读 · 0 评论 -
Beans Game(逆推sg值)
题目链接:https://cn.vjudge.net/problem/ZOJ-3057 There 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 last bean wil...转载 2019-02-20 15:21:44 · 218 阅读 · 0 评论 -
POJ-2068 Nim(博弈DP,sg)
题目链接:https://cn.vjudge.net/problem/POJ-2068Let's play a traditional game Nim. You and I are seated across a table and we have a hundred stones on the table (we know the number of stones exactly). We...原创 2019-02-20 20:25:07 · 211 阅读 · 0 评论 -
Nim (nim博弈+前缀异或和+思维)
Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. The game ends when one of the players is unable to remove object in his/her turn. This play...原创 2019-03-12 23:58:28 · 1364 阅读 · 0 评论 -
Watermelon(博弈?模拟)
链接:https://ac.nowcoder.com/acm/contest/893/E来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述在ACM队暑假集训的某一天,实验室里有 n个人。因为天气很热,大家都很想吃西瓜。于是Eric买了 m个西瓜拿到了实验室。Eric...原创 2019-05-07 21:43:44 · 411 阅读 · 0 评论 -
棋盘的必胜策略(SG函数)
链接:https://ac.nowcoder.com/acm/problem/21797来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述有一个二维棋盘,棋盘有r行c列,棋盘中的每一个位置有如下四种情况'E': 表示出口,可能有多个'T': 只有一个,表示起点'#...原创 2019-08-04 14:15:22 · 1060 阅读 · 0 评论