Submission #2851

#TimeUsernameProblemLanguageResultExecution timeMemory
28516590f1속이기 (GA5_fake)C++98
100 / 100
0 ms1092 KiB
#include <stdio.h> int d[1001]; int main () { int n,i,k=0,ind,min=9999999,sum=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&d[i]); sum=sum+d[i]; if(min>d[i]){ min=d[i]; ind=i; } } sum=sum-min; for(i=1;i<=n;i++){ if(ind==i)continue; else if(k==0){ k=d[i]; continue; } k=k^d[i]; } if(min==k)printf("%d",sum); else printf("0"); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...