
博弈
文章平均质量分 61
蘑菇小哲
在通往梦想的道路上奋力潜行
展开
-
博弈题目合集(HDU,ZOJ,POJ)
转载http://blog.youkuaiyun.com/ACM_cxlove?viewmode=contents by---cxlove首先当然要献上一些非常好的学习资料:基础博弈的小结:http://blog.youkuaiyun.com/acm_cxlove/article/details/7854530经典翻硬币游戏小结:http://blog.youkuaiyun.com/acm_cxlo转载 2014-04-10 22:51:07 · 1168 阅读 · 0 评论 -
HDU 3032 Nim or not Nim(SG函数打表找规律)
解题思路:通过打表发现,当x % 4 == 0 的时候SG值为x - 1,当x % 4 == 3的时候SG值为x + 1,其他时候SG值为x;//AC代码#include #include #include #include #include #include #include #include using namespace std;const int MAXN =原创 2015-04-10 14:16:12 · 576 阅读 · 0 评论 -
HDU 4664 Triangulation (SG函数,打表找规律)
解题思路:打表,发现是一个带尾巴的循环,找循环节,34;#include #include #include #include #include #include #include #include using namespace std;const int MAXN = 1000 + 10;int vis[MAXN];int SG[MAXN];int mex(in原创 2015-04-10 14:53:30 · 669 阅读 · 0 评论 -
HDU 3980 Paint Chain(SG函数)
Problem Description:Aekdycoin and abcdxyzk are playing a game. They get a circle chain with some beads. Initially none of the beads is painted. They take turns to paint the chain. In Each turn one p原创 2015-04-08 16:35:02 · 675 阅读 · 0 评论 -
HDU 4764 Stone(巴什博弈变形)
Problem Description:Tang and Jiang are good friends. To decide whose treat it is for dinner, they are playing a game. Specifically, Tang and Jiang will alternatively write numbers (integers) on a wh原创 2015-04-08 17:09:20 · 625 阅读 · 0 评论 -
HDU 4642 Fliping game(简单博弈)
解题思路:博弈问题不会出现平局,若右下角为0,先手永远也不可能赢。所以右下角为0先手输,右下角为1后手输#include #include #include #include using namespace std;const int MAXN = 100 + 10;int N, M;int m[MAXN][MAXN];int main(){ int T; scanf原创 2015-04-08 22:44:02 · 540 阅读 · 0 评论 -
HDU 1524 A Chess Game(SG函数)
Problem Description: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 topo原创 2015-04-09 18:16:45 · 619 阅读 · 0 评论