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 <iostream>
#include <string>
#include <math.h>
#include <sstream>
#include <cstdio>
#include <algorithm>
using namespace std;
int N;
int main() {
int xorRes = 0, sum = 0, smallest = 1<<30;
scanf("%d",&N);
for(int i = 1;i<=N;i++) {
int n;
scanf("%d", &n);
xorRes ^= n;
sum += n;
smallest = min(smallest, n);
}
if(xorRes == 0)
printf("%d\n", sum - smallest);
else
printf("%d\n", 0);
return 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... |