제출 #769860

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7698602023-06-30 11:41:04TrunktyHedgehog Daniyar and Algorithms (IZhO19_sortbooks)C++14
13 / 100
1860 ms100180 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
int n,m;
int arr[1000005],bef[1000005];
int maxbef[4000020],maxi[4000020],mini[4000020];
void build(int node, int l, int r){
if(l==r){
maxbef[node] = bef[l];
maxi[node] = arr[l];
mini[node] = arr[l];
}
else{
int mid = (l+r)/2;
build(node*2,l,mid);
build(node*2+1,mid+1,r);
maxbef[node] = max(maxbef[node*2],maxbef[node*2+1]);
maxi[node] = max(maxi[node*2],maxi[node*2+1]);
mini[node] = min(mini[node*2],mini[node*2+1]);
}
}
int querymaxi(int node, int l, int r, int needl, int needr){
if(l>needr or r<needl){
return 0;
}
else if(l>=needl and r<=needr){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...