# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
266471 | eagle30 | XORanges (eJOI19_xoranges) | C++14 | 1095 ms | 2628 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimization ("Ofast")
#pragma GCC optimization ("unroll-loops")
#pragma GCC target ("avx2")
#include<bits/stdc++.h>
using namespace std;
long long arr[1000000];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n, m;
cin>>n>>m;
for(long long i=1; i<=n; i++)
cin>>arr[i];
long long a, b, c;
for(long long i=0; i<m; i++){
cin>>a>>b>>c;
if(a==2){
long long hi=c-b+1;
if(hi%2==0)
cout<<0<<'\n';
else{
long long yo=0;
for(long long j=b; j<=c; j+=2)
yo=(yo^arr[j]);
cout<<yo<<'\n';
}
}
else
arr[b]=c;
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |