很简单,这个可以转化成尼姆博弈的模型。
因为两两之间的空格就相当于石子(因为它们相对而言,前一个能移动多少步,后一个也能移动相同的个数,所以相对位置是没有变化的 最后改变的还是它们之间差距的大小)
注意奇数特判就行了。
/*
qq:1239198605
ctgu_yyf
*/
#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#define ll long long
using namespace std;
int n,k;
int s[1010];
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
scanf("%d",&n);
for(int i=1; i<=n; i++)
scanf("%d",&s[i]);
sort(s+1, s+n+1);
int ans;
if(n%2 == 0)
{
ans = s[2]-s[1]-1;
for(int i=4; i<=n; i+=2) ans ^= (s[i]-s[i-1]-1);
if(ans == 0) cout<<"Bob will win"<<endl;
else cout<<"Georgia will win"<<endl;
}
else
{
ans = s[1]-1;
for(int i=3; i<=n; i+=2) ans ^= (s[i]-s[i-1]-1);
if(ans == 0) cout<<"Bob will win"<<endl;
else cout<<"Georgia will win"<<endl;
}
}
return 0;
}