
博弈
文章平均质量分 79
madaidao
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #726 (Div. 2) D. Deleting Divisors(博弈)
题目链接:https://codeforces.com/contest/1537/problem/D题目大意: 有一个数字,两个人轮流进行操作,每一个人操作时,可以选择除开1和n以外任意一个n的因子D,将n减去这个因子D,第一个不能操作的人输掉游戏。若两个人都按照最优策略来操作,是先手必赢还是后手必赢。题解: 当n为素数时,面对这个情况的人输,而所有素数中除了2为偶数,其余的素数一定为奇数。 分类讨论: 1,若...原创 2021-06-23 19:26:00 · 168 阅读 · 0 评论 -
Codeforces Round #721 (Div. 2) B2. Palindrome Game (hard version) (博弈问题)
题目链接:https://codeforces.com/contest/1527/problem/B2题目大意:有一个长度为的字符串,由字符'0'和'1'组成。Alice和Bob进行游戏,一人操作一个回合,Alice先。每个回合可以进行两种操作:1,把某个字符‘0’变成'1',支付1元2,若目前字符串不是回文串,且上个回合不是执行的操作2,则可以把字符串翻转,支付0元最后字符串全部变为1时,游戏结束,此时花的钱少的人获胜。本题有两个版本:1,简单的版本:初始的时候字符串是原创 2021-05-21 20:02:21 · 206 阅读 · 0 评论 -
Codeforces 455B A Lot of Games(博弈)
B. A Lot of Gamestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew, Fedor and Alex are inventive guys.原创 2014-08-09 13:17:12 · 980 阅读 · 0 评论 -
Hdu 4111 Alice and Bob(博弈+记忆化搜索)
题目链接Alice and BobTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1587 Accepted Submission(s): 575Problem DescriptionAlice and原创 2014-09-26 19:24:07 · 458 阅读 · 0 评论 -
zoj 3882 Help Bob(博弈)
题目链接Help BobTime Limit: 2 Seconds Memory Limit: 65536 KBThere is a game very popular in ZJU at present, Bob didn't meant to participate in it. But he decided to join it after discov原创 2015-07-31 21:36:31 · 477 阅读 · 0 评论