#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll n,q,l,r,s;
cin>>n>>q;
ll a[n+1];
for(int i=1;i<=n;i++){
cin>>a[i];
}
while(q--){
cin>>s>>l>>r;
if(s==1){
a[l]=r;
}
else{
if(l%2!=r%2){
cout<<0<<endl;
}
else{
ll ans=0;
for(int i=l;i<=r;i+=2){
ans^=a[i];
}
cout<<ans;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1080 ms |
2304 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |