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 <bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
int n;
cin >> n;
vector<int>pr(n + 1, 0), a(n);
for(int i = 0; i < n; ++i){
cin >> a[i];
pr[i + 1] = pr[i] + a[i];
}
int res = 0;
for(int i = 1; i <= n; ++i){
for(int j = i; j <= n; ++j){
int f = a[i - 1] + a[j - 1];
res ^= f;
}
}
cout << res << endl;
}
signed main(){
int t = 1;
while(t--){
solve();
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |