#include <bits/stdc++.h>
using namespace std;
const int nx=1e6+5;
int n, a[nx], f[nx], res;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n;
for (int i=1; i<=n; i++) cin>>a[i], f[a[i]]++;
for (int i=1; i<=4000; i++) for (int j=i+1; j<=4000; j++) if ((f[i]%2)&&(f[j]%2)) res=res^(i+j);
for (int i=1; i<=4000; i++) if ((f[i]*(f[i]+1)/2)%2) res=(res^(2*i));
cout<<res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
4688 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
10568 KB |
Output is correct |
2 |
Correct |
54 ms |
10064 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
10568 KB |
Output is correct |
2 |
Correct |
54 ms |
10064 KB |
Output is correct |
3 |
Incorrect |
79 ms |
14920 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
4688 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
4688 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |