mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
22 lines
395 B
C++
22 lines
395 B
C++
|
#include<stdio.h>
|
||
|
int main()
|
||
|
{
|
||
|
int temp,t,n,s,x,i;
|
||
|
scanf("%d",&t);
|
||
|
while(t--)
|
||
|
{
|
||
|
scanf("%d",&n);
|
||
|
for(i=s=temp=0;i<n;i++)
|
||
|
{
|
||
|
scanf("%d",&x);
|
||
|
if(x>1) temp=1;
|
||
|
s^=x;
|
||
|
}
|
||
|
if((s&&temp)||(!s&&!temp))
|
||
|
puts("John");
|
||
|
else
|
||
|
puts("Brother");
|
||
|
}
|
||
|
return 0;
|
||
|
}
|