[原博客] POJ 1704 Georgia and Bob
2014-09-07 23:52
246 查看
题目链接
题意:
View Code
题意:
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> //by zrt //problem: using namespace std; typedef long long LL; const int inf(0x3f3f3f3f); const double eps(1e-9); int tt; int a[1005]; int b[1005]; int main(){ #ifdef LOCAL freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif scanf("%d",&tt); while(tt--){ int n; scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); sort(a,a+n+1); for(int i=1;i<=n;i++) b[i]=a[i]-a[i-1]-1; int sg=0; for(int i=n;i>0;i-=2){ sg^=b[i]; } if(!sg) puts("Bob will win"); else puts("Georgia will win"); } return 0; }
View Code
相关文章推荐
- POJ 1704 Georgia and Bob
- poj 1704 Georgia and Bob(博弈)
- poj 1704 Georgia and Bob
- poj 1704 Georgia and Bob 博弈
- POJ 1704 Georgia and Bob (Nim游戏变形)
- POJ 1704 Georgia and Bob【Nim博弈】
- poj1704 Georgia and Bob
- 博弈最高位POJ 1704(Georgia and Bob-Nim博弈)
- 数论练习2:K - Georgia and Bob(POJ 1704) SG函数运用:尼姆博奕(Nimm Game)
- 【博弈】poj1704 Georgia and Bob
- POJ-1704-Georgia and Bob
- POJ 1704 Georgia and Bob
- POJ 1704 Georgia and Bob
- poj&nbsp;1704&nbsp;Georgia&nbsp;and&nbsp;Bob(博奕)
- POJ 1704 Georgia and Bob
- POJ 1704 Georgia and Bob(尼姆变形)
- poj1704 Georgia and Bob(阶梯博弈)
- poj 1704 Georgia and Bob 博弈
- POJ 1704 Georgia and Bob(nim博弈论)
- POJ 1704(Georgia and Bob-Nim博弈)