POJ2311 Cutting Game】的更多相关文章

Cutting Game poj-2311 题目大意:题目链接 注释:略. 想法: 我们发现一次操作就是将这个ICG对应游戏图上的一枚棋子变成两枚. 又因为SG定理的存在,记忆化搜索即可. 最后,附上丑陋的代码... ... #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define N 250 using namespace std; bool…
Cutting Game Description Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his extraordinary wit. Recently Urej takes a great interest in a new game, and Erif Nezo…
题意 Language:Default Cutting Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6007 Accepted: 2190 Description Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those game…
总时间限制: 1000ms 内存限制: 65536kB 描述 Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his extraordinary wit. Recently Urej takes a great interest in a new game, and Eri…
由于异或运算满足结合律,我们把当前状态的SG函数定义为 它所能切割成的所有纸片对的两两异或和之外的最小非负整数. #include<cstdio> #include<set> #include<cstring> using namespace std; int n,m,SG[201][201]; int sg(int x,int y) { if(SG[x][y]!=-1) return SG[x][y]; set<int>S; for(int i=2;i&l…
正解:博弈论 解题报告: 传送门! 首先看到说,谁先$balabala$,因为$SG$函数是无法解决这类问题的,于是考虑转化成"不能操作者赢/输"的问题,不难想到先剪出$1\cdot 1$一定是对手剪出了一个$1\cdot n$的格子,于是就变成,不能剪出$1\ x\ n$的格子,不能操作者败 然后就可以直接用$SG$函数,,,?就对于$n\cdot m$的一个局面,剪一道就相当于分成了$i\cdot m$,$(n-i)\cdot m$的两个子游戏(竖着剪差不多就先只讨论横着剪了昂$Q…
SG函数: 给定一个有向无环图和一个起始顶点上的一枚棋子,两名选手交替的将这枚棋子沿有向边进行移动,无法移 动者判负.事实上,这个游戏可以认为是所有Impartial Combinatorial Games的抽象模型.也就是说,任何一个ICG都可以通过把每个局面看成一个顶点,对每个局面和它的子局面连一条有向边来抽象成这个“有向图游戏”.下 面我们就在有向无环图的顶点上定义Sprague-Garundy函数.首先定义mex(minimal excludant)运算,这是施加于一个集合的运算,表示最…
基础博弈的小结:http://blog.csdn.net/acm_cxlove/article/details/7854530 经典翻硬币游戏小结:http://blog.csdn.net/acm_cxlove/article/details/7854534 经典的删边游戏小结:http://blog.csdn.net/acm_cxlove/article/details/7854532 五篇国家集训队论文: 张一飞: <由感性认识到理性认识——透析一类搏弈游戏的解答过程 > 王晓珂:<…
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents    by---cxlove 首先当然要献上一些非常好的学习资料: 基础博弈的小结:http://blog.csdn.net/acm_cxlove/article/details/7854530 经典翻硬币游戏小结:http://blog.csdn.net/acm_cxlove/article/details/7854534 经典的删边游戏小结:http://blog.csdn…
Description In order to build a ship to travel to Eindhoven, The Netherlands, various sheet metal parts have to be cut from rectangular pieces of sheet metal. Each part is a convex polygon with at most 8 vertices. Each rectangular piece of sheet meta…