#include <bits/stdc++.h>
#define mp make_pair
#define F first
#define S second
#define eb emplace_back
#define printv(a, b) { \
for(auto pv : a) b << pv << " "; \
b << "\n"; \
}
using namespace std;
typedef long long ll;
using pii = pair<int, int>;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<ll> cnt(4001);
int ans = 0;
for(int i = 1; i <= n; i++){
int v;
cin >> v;
cnt[v]++;
}
for(int i = 1; i <= 10; i++){
for(int j = 1; j < i; j++){
if(cnt[i] * cnt[j] % 2) ans ^= i + j;
//cerr << cnt[i] << " " << cnt[j] << " " << cnt[i] * cnt[j] << " " << i + j << " " << ans << "\n";
}
if(cnt[i] * (cnt[i] + 1) / 2 % 2) ans ^= i + i;
}
cout << ans << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
84 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
84 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |