![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
博弈
文章平均质量分 82
dongfangyuxuan
这个作者很懒,什么都没留下…
展开
-
博弈 POJ A New Stone Game
/* http://poj.org/problem?id=1740 */#include #include #include #include #include using namespace std;int main(){#ifndef ONLINE_JUDGE freopen("in", "r", stdin);#endif int n; RL:while(ci原创 2012-08-27 14:08:53 · 348 阅读 · 0 评论 -
博弈
转载:http://blog.csdn.net/new_wu/article/details/7393387 博弈常出现在信息学与数学类的试题中,有一类试题无法用常见的博弈树来解答,寻找必败态为针对此类试题的一种解题思路此类问题一般有如下特点:1、 两人轮流决策,都采用最优策略2、 博弈是有限的,在有限步后会决出胜负3、 公平博弈,两人遵循相同的规则 必转载 2012-08-27 11:11:17 · 282 阅读 · 0 评论 -
类似取石子 POJ 1704 Georgia and Bob
/*http://poj.org/problem?id=1704当n为奇数时,将第一个位置与0绑定。要注意排序。*/#include #include #include #include using namespace std;int ans[1111];int main(){#ifndef ONLINE_JUDGE freopen("in", "r",原创 2012-08-27 14:13:30 · 379 阅读 · 0 评论 -
类似取石子 POJ 1704 Georgia and Bob
/*http://poj.org/problem?id=1704当n是奇数时,将第一个数的位置与0绑定,注意输入的数据不一定是按从小到大排序的,所以要进行排序*/#include #include #include #include using namespace std;int ans[1111];int main(){#ifndef ONLINE_JUDGE原创 2012-08-27 14:16:54 · 196 阅读 · 0 评论 -
公平游戏的Sprague-Grundy定理
原文地址:Theory">Sprague-Grundy Theory作者:unmoralThe Sprague-Grundy theory of impartial games公平游戏的Sprague-Grundy定理November 9, 2005An impartial game is a two-player game in which bothplayers have转载 2012-08-28 17:01:04 · 2208 阅读 · 0 评论 -
SG函数 hdu 1536 S-Nim
/*http://acm.hdu.edu.cn/showproblem.php?pid=1536题意:取石子问题,但是每次所取的石子的个数必须是s[]里面的数,求每个位置是必败点还是胜点*/#include #include #include #include #include using namespace std;const int N = 105原创 2012-08-28 17:37:44 · 606 阅读 · 0 评论 -
求到达必败态的方法数 ZOJ 3067 Nim
/*http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3067题意:求胜态到达必败态的方法数Nim*/#include #include #include #include #include using namespace std;int s[1005];int main(){#原创 2012-08-28 20:31:09 · 329 阅读 · 0 评论