POJ 2484 A Funny Game 博弈论 对称博弈

Posted 鲸头鹳

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了POJ 2484 A Funny Game 博弈论 对称博弈相关的知识,希望对你有一定的参考价值。

http://poj.org/problem?id=2484

1和2时Alice必胜,3时Bob必胜,其他情况下Bob只需要在Alice取过之后取一次将剩下的硬币链平均分为两份,然后Alice怎么取Bob对称着取就可以了。

真是巧妙。

代码

 1 #include<cstdio>
 2 #include<cstring>
 3 #include<algorithm>
 4 #include<cmath>
 5 #include<iostream>
 6 #include<map>
 7 using namespace std;
 8 int m;
 9 int main(){
10     while(~scanf("%d",&m)){
11         if(!m)break;
12         if(m<3)printf("Alice\\n");
13         else printf("Bob\\n");
14     }
15     return 0;
16 }
View Code

 

以上是关于POJ 2484 A Funny Game 博弈论 对称博弈的主要内容,如果未能解决你的问题,请参考以下文章

POJ 2484 A Funny Game 博弈论 对称博弈

每天一道博弈论之“A funny game”(poj 2484)

poj 2484 A Funny Game

POJ 2484 A Funny Game

POJ 2484A Funny Game

poj 2484 A Funny Game