Submission #266471

#TimeUsernameProblemLanguageResultExecution timeMemory
266471eagle30XORanges (eJOI19_xoranges)C++14
55 / 100
1095 ms2628 KiB
#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)

xoranges.cpp:1: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    1 | #pragma GCC optimization ("Ofast")
      | 
xoranges.cpp:2: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    2 | #pragma GCC optimization ("unroll-loops")
      |
#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...