Submission #2789

#TimeUsernameProblemLanguageResultExecution timeMemory
2789domece속이기 (GA5_fake)C++98
0 / 100
492 ms1088 KiB
#include<cstdio> int N; int max=0; int arr[15]; int X[15],Y[15]; int Xp,Yp; void btrack(int,int); int main(){ int i; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&arr[i]); btrack(0,0); btrack(0,1); printf("%d",max); return 0; } void btrack(int nItem,int flag){ if(nItem==N){ int XOR_X=X[0],XOR_Y=Y[0]; int i; for(i=1;i<Xp;i++){ XOR_X^=X[i]; } for(i=1;i<Yp;i++){ XOR_Y^=Y[i]; } if(X[i]==Y[i]){ if(max<X[i]) max=X[i]; } return; } if(flag==0){ X[Xp++]=arr[nItem]; btrack(nItem+1,0); btrack(nItem+1,1); Xp--; } if(flag==1){ Y[Yp++]=arr[nItem]; btrack(nItem+1,0); btrack(nItem+1,1); Yp--; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...