#include<bits/stdc++.h>
using namespace std;
const int mxN = 2e5 + 5;
int n;
int a[mxN];
int dp[mxN];
int main(){
ios::sync_with_stdio(0),cin.tie(0);
int q;
cin>> n >> q;
for(int i=1;i<=n;i++) cin>> a[i];
for(int i=1;i<=n;i++) dp[i] = a[i] ^ dp[i-1];
while(q--){
int l,r;
cin>> l >> r;
int ans = dp[r] ^ dp[l-1];
cout<< ans << "\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
58 ms |
8004 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |