#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();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
348 KB |
Output is correct |
2 |
Correct |
12 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1637 ms |
20560 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1637 ms |
20560 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
348 KB |
Output is correct |
2 |
Correct |
12 ms |
348 KB |
Output is correct |
3 |
Execution timed out |
1648 ms |
2904 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
348 KB |
Output is correct |
2 |
Correct |
12 ms |
348 KB |
Output is correct |
3 |
Execution timed out |
1637 ms |
20560 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |