Submission #697226

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6972262023-02-09 00:00:12ToroTN벽 (IOI14_wall)C++14
100 / 100
803 ms103288 KiB
#include<bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mp make_pair
#include "wall.h"
pair<int,int> lz[8000005],seg[8000005];
int ans[2000005];
pair<int,int> merge(pair<int,int> lz1,pair<int,int> lz2)
{
if(lz2.X>lz1.Y)return mp(lz2.X,lz2.X);
if(lz2.Y<lz1.X)return mp(lz2.Y,lz2.Y);
return mp(max(lz1.X,lz2.X),min(lz1.Y,lz2.Y));
}
void update(int tree,int st,int ed,int l,int r,int x,int y)
{
int md=(st+ed)/2;
if(st>=l&&ed<=r)
{
lz[tree]=merge(lz[tree],mp(x,y));
}
if(st!=ed)
{
lz[2*tree]=merge(lz[2*tree],lz[tree]);
lz[2*tree+1]=merge(lz[2*tree+1],lz[tree]);
}
seg[tree]=merge(seg[tree],lz[tree]);
lz[tree].X=0,lz[tree].Y=1e9;
if(st>r||ed<l)return;
if(st>=l&&ed<=r)return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...