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>
#include <algorithm>
using namespace std;
int p[2000];
int main() {
int n;
scanf("%d", &n);
int x=0;int sum=0;
for (int i = 0; i < n; i++) {
scanf("%d",p+i);
x^=p[i];
}
sort(p,p+n);
for(int i=1;i<n;i++){
sum+=p[i];
}
if(x==0)
printf("%d",sum);
else puts("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... |