제출 #263549

#제출 시각아이디문제언어결과실행 시간메모리
263549eagle30XORanges (eJOI19_xoranges)C++14
18 / 100
1079 ms2396 KiB
#include<bits/stdc++.h> using namespace std; long long arr[1000000]; int main(){ 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; 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'; } } 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...