#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int n, q; cin >> n >> q;
vector<int> a(n + 1);
for (int i = 1; i <= n; i++){
cin >> a[i];
}
while(q--){
int t, l, u; cin >> t >> l >> u;
if ((u - t + 1) % 2 == 0){
cout << 0 << endl;
}else{
int x = 0;
for (int i = l; i <= u; i += 2){
x ^= a[i];
}
cout << x << endl;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1027 ms |
6844 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |