From 7f0e304b5df4a6f83886bb91c04e44f0e9654af6 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Thu, 14 Apr 2016 21:18:10 +0800 Subject: [PATCH] Create 1907.cpp --- HDOJ/1907.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 HDOJ/1907.cpp diff --git a/HDOJ/1907.cpp b/HDOJ/1907.cpp new file mode 100644 index 0000000..8d18899 --- /dev/null +++ b/HDOJ/1907.cpp @@ -0,0 +1,54 @@ +#include +#include +#include +using namespace std; + +int main() +{ + int t; + scanf("%d",&t); + for(int i=0;i1) + { + have_over_one=true; + } + ans=ans^tmp; + } + #if 0 + printf("%d\n",ans); + #endif // 0 + if(!have_over_one) + { + if(n%2==0) + { + printf("John\n"); + } + else + { + printf("Brother\n"); + } + } + else + { + if(ans==0) + { + printf("Brother\n"); + } + else + { + printf("John\n"); + } + } + } + return 0; +}