![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
博弈
zhuxiyulu
这个作者很懒,什么都没留下…
展开
-
51nod 1185 威佐夫游戏 V2(威佐夫博弈)
#include <iostream> #include <cmath> #include <cstdio> /* 博弈论之黄金分割定律,属于奇异局。 数据比较大,高精度,乘法模拟。 */ using namespace std;typedef unsigned long long ULL;const ULL Gold[3] = {618033988, 749894848, 204586834};原创 2017-08-02 21:13:18 · 182 阅读 · 0 评论 -
HDU6105 Gameia(博弈+图)
#include <iostream> #include <cstdio> #include <vector> #include <cstring> using namespace std; /* 博弈+图 给定一个树,对空节点进行染色,数有n个节点,根为1 Bob有k次删边的机会, Bob选择一个空节点染色(黑色),他的儿子节点也会被染黑 Alice可以任选一个空节点染色(白色) 如果有白色点则原创 2017-08-12 13:14:19 · 296 阅读 · 0 评论 -
51nod1072 威佐夫游戏
#include <cstdio> #include <cmath> #include <iostream> using namespace std; typedef long long LL; int a,b; /* 威佐夫博弈 博弈黄金分割理论 如果a == k,则为后手赢,否则先手赢(奇异局) */ int main() { int t; scanf("%d", &t);原创 2017-08-06 21:57:47 · 194 阅读 · 0 评论 -
51nod1069 Nim游戏
/* Nim博弈 */ #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int maxn=1e3+5; int n; int a[maxn];int main() { while(~scanf("%d",&n)) { for(int i=0;i<n;i原创 2017-08-27 14:49:53 · 202 阅读 · 0 评论