This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
int arr[1000];
int min(int a,int b) {
return a<b ? a:b;
}
int main() {
int n, sum=0, XOR=0;
scanf("%d",&n);
for(int i=0;i<n;i++) {
scanf("%d",arr+i);
sum += arr[i];
XOR ^= arr[i];
}
int minElement = 0x7fffffff;
for(int i=0;i<n;i++)
minElement = min(minElement,arr[i]);
printf("%d", XOR == 0 ? sum-minElement : 0);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |