#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;
int x = 0;
for (int i = 1; i <= u - l + 1; i++){
//cout << i << endl;
for (int j = l; j <= u - i + 1; j++){
//cout << "j:::::" << j << endl;
for (int k = j; k <= j + i - 1; k++){
x ^= a[k];
}
}
}
cout << x << endl;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
423 ms |
348 KB |
Output is correct |
2 |
Correct |
359 ms |
348 KB |
Output is correct |
3 |
Correct |
496 ms |
348 KB |
Output is correct |
4 |
Execution timed out |
1062 ms |
348 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1062 ms |
1884 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |