# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2789 |
2013-07-31T10:46:32 Z |
domece |
속이기 (GA5_fake) |
C++ |
|
492 ms |
1088 KB |
#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 time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
1084 KB |
SIGSEGV Segmentation fault |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
492 ms |
1084 KB |
Program hung waiting for input |
2 |
Halted |
0 ms |
0 KB |
- |