Submission #447577

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4475772021-07-26 20:44:28MrDebooXORanges (eJOI19_xoranges)C++17
100 / 100
180 ms13568 KiB
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
#define mod 1000000007
#define INF 1000000000000000000
using namespace std;
int seg1[600000];
int seg2[600000];
int N,a,b,c;
int solve1(int l=1,int r=N,int in=1){
if(r<b||c<l)return 0;
if(l>=b&&r<=c)return seg1[in];
int mid=(l+r)/2;
return solve1(l,mid,in*2)^solve1(mid+1,r,in*2+1);
}
int solve2(int l=1,int r=N,int in=1){
if(r<b||c<l)return 0;
if(l>=b&&r<=c)return seg2[in];
int mid=(l+r)/2;
return solve2(l,mid,in*2)^solve2(mid+1,r,in*2+1);
}
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
//freopen("tttt.in", "r", stdin);
//freopen("tttt.out", "w", stdout);
int n,q;
cin>>n>>q;
N=exp2(ceil(log2(n)));
for(int i=0;i<n;i++){
if(i&1)cin>>seg1[i+N];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...