제출 #358484

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3584842021-01-25 14:43:04medmdg벽 (IOI14_wall)C++17
0 / 100
3063 ms14060 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll N=2000009;
int ma[4*N];
int a[4*N];
int mi[4*N];
void build(int l,int r,int p){
ma[p]=200000;
mi[p]=0;
a[p]=0;
if(l==r){
return;
}
build(l,(l+r)/2,p*2);
build((l+r)/2+1,r,p*2+1);
return;
}
void setla(int l,int r,int p){
if(l==r)
return;
if((l+r)/2-l!=0){
ma[p*2]=max(ma[p*2],mi[p]);
mi[p*2]=min(mi[p*2],ma[p]);
ma[p*2]=min(ma[p],ma[p*2]);
mi[p*2]=max(mi[p*2],mi[p]);
}else{
if(a[p*2]>ma[p])
a[p*2]=ma[p];
if(a[p*2]<mi[p])
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...