/*
http://poj.org/problem?id=1704
当n为奇数时,将第一个位置与0绑定。
要注意排序。
*/
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int ans[1111];
int main(){
#ifndef ONLINE_JUDGE
freopen("in", "r", stdin);
#endif
int nCase;
cin >>nCase;
while(nCase--){
int n, res = 0;
cin >>n;
ans[0] = 0;
for(int i=1; i<=n; i++)
cin >>ans[i];
sort(ans, ans+n+1);
int i;
if(n%2 == 0)
i = 2;
else
i = 1;
for( ; i<=n; i+=2)
res ^= ans[i]-ans[i-1]-1;
if(res)
cout <<"Georgia will win" <<endl;
else
cout <<"Bob will win" <<endl;
}
return 0;
}
类似取石子 POJ 1704 Georgia and Bob
最新推荐文章于 2021-11-25 15:10:12 发布