标签:
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 3762 Accepted Submission(s): 2127
int main() { int T, n; scanf("%d", &T); while (T --) { scanf("%d", &n); int res = 0, cnt = 0, tmp; for (int i = 1; i <= n; i ++) { scanf("%d", &tmp); res ^= tmp; if (tmp > 1) cnt ++; } if ((res == 0 && cnt == 0) || (res && cnt)) printf("John\n"); else printf("Brother\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/LinKArftc/p/4916567.html