Created
November 13, 2016 15:31
-
-
Save tina1998612/98c9cf68539826a84f259d5121dbaa37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
long long cas,n,node,k,sum; | |
int main() { | |
scanf("%lld",&cas); | |
while(cas--){ | |
sum=0; | |
scanf("%lld",&n); | |
for(int i=0;i<n;i++){ | |
scanf("%lld%lld",&node,&k); | |
sum^=(node&1); | |
} | |
if(!(n&1) && !sum) printf("BEN\n"); | |
else printf("BOB\n"); | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment