#include <bits/stdc++.h>
using namespace std;
long long int arr[1000010];
int main(){
long long int n, q, i, j, k, a, b, c, x;
cin>>n>>q;
for(i=1; i<=n; i++){
cin>>arr[i];
}
for(i=0; i<q; i++){
cin>>a>>b>>c;
if(a==1){
arr[b]=c;
}
else{
x=0;
for(j=b; j<=c; j++){
for(k=j; k<=c; k++){
x=x^arr[k];
}
}
cout<<x<<endl;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
436 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
436 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1096 ms |
3924 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
436 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |