POJ 2234-Matches Game(博弈)
来源:互联网 发布:刻录dvd软件 编辑:程序博客网 时间:2024/05/22 23:30
题目链接:点击打开链接
Nim博弈。裸题。必败状态为 n堆物品数目的异或值为0.否则必胜。(先手)
#include <algorithm>#include <iostream>#include <cstring>#include <cstdlib>#include <string>#include <cctype>#include <vector>#include <cstdio>#include <cmath>#include <queue>#include <stack>#include <map>#include <set>#define maxn 10100#define _ll __int64#define ll long long#define INF 0x3f3f3f3f#define Mod 1000000007#define pp pair<int,int>#define ull unsigned long longusing namespace std;int main(){int n,x,ok;while(~scanf("%d",&n)){scanf("%d",&ok);--n;while(n--){scanf("%d",&x);ok^=x;}if(ok)puts("Yes");else puts("No");} return 0;}
1 0
- POJ 2234-Matches Game(博弈)
- poj 2234 Matches Game (博弈)
- [博弈]POJ 2234 Matches Game
- POJ 2234 Matches Game(博弈)
- POJ 2234 Matches Game(尼姆博弈)
- POJ 2234 Matches Game (nim博弈裸题)
- POJ-2234 Matches Game(尼姆博弈)
- POJ-2234-Matches Game(尼姆博弈)
- POJ 2234 Matches Game 尼姆博弈
- POJ 2234 Matches Game 尼姆博弈
- poj--2234--Matches Game(尼姆博弈)
- POJ--2234 Matches Game(尼姆博弈)
- POJ 2234 Matches Game (经典Nim博弈)
- 2234-Matches Game-博弈
- poj 2234Matches Game尼姆博弈模版题
- POJ Matches Game 2234【经典博弈Nim游戏】
- pku 2234 matches game 博弈
- POJ-2234:Matches Game
- HDU 1280 前m大的数 (排序)
- hdu 2037
- 使用TileMap制作游戏,在cocos2d-x中使用(二)
- java持久化API
- 想着每年都要常回家看看
- POJ 2234-Matches Game(博弈)
- java 项目遇到的各种错误
- oracle查询表字段个数
- MyEclipse中解决jdk内存溢出
- 使用TileMap制作游戏,在cocos2d-x中使用(三)
- hdu 2191
- java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager 2009-01-07 14:04 22
- 认认真真磨练自己的Java技术
- POJ 题目1306 Combinations(排列组合)