Submission #2876

#TimeUsernameProblemLanguageResultExecution timeMemory
2876pl0892029속이기 (GA5_fake)C++98
100 / 100
0 ms1092 KiB
#include <cstdio> int bit[17]; int arr[1000]; int min(int a,int b) { return a<b ? a:b; } int main() { int n, sum=0; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%d",arr+i); sum += arr[i]; for(int j=0;(1<<j)<=arr[i];j++) if( (arr[i]&(1<<j)) > 0 ) bit[j]++; } for(int i=0;i<17;i++) { if( bit[i]%2 == 1 ) { puts("0"); return 0; } } int minElement = 0x7fffffff; for(int i=0;i<n;i++) minElement = min(minElement,arr[i]); printf("%d",sum-minElement); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...