#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(v) v.begin(),v.end()
#define endl '\n'
const int N = 1e6 + 10;
ll n, a[N], ans;
map<ll,ll>mp;
void solve(){
cin >> n;
for(int i = 1; i <= n; i++){
cin >> a[i];
mp[a[i]]++;
}
for(auto i : mp){
for(auto j : mp){
if(j.first <= i.first) continue;
if((j.second * i.second)&1){
ans ^= (j.first + i.first);
}
}
ans ^= (2*i.first);
}
cout << ans << endl;
}
int main(){
int t = 1;
// cin >> t;
while(t--){
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
98 ms |
604 KB |
Output is correct |
2 |
Correct |
106 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
314 ms |
13072 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
314 ms |
13072 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
98 ms |
604 KB |
Output is correct |
2 |
Correct |
106 ms |
604 KB |
Output is correct |
3 |
Execution timed out |
1626 ms |
8272 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
98 ms |
604 KB |
Output is correct |
2 |
Correct |
106 ms |
604 KB |
Output is correct |
3 |
Incorrect |
314 ms |
13072 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |