Submission #266478

#TimeUsernameProblemLanguageResultExecution timeMemory
266478eagle30XORanges (eJOI19_xoranges)C++14
55 / 100
1093 ms2656 KiB
#include<bits/stdc++.h> using namespace std; #pragma GCC target("avx,avx2,fma") #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") 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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...