제출 #7406

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
74062014-08-05 03:05:07ainta벽 (IOI14_wall)C++98
100 / 100
992 ms57688 KiB
#include "wall.h"
#include<algorithm>
using namespace std;
#define SZ 2097152
int Res[SZ], N;
struct SegTree{
int B, E;
}IT[SZ*2+2];
void spread(int node){
IT[node * 2].B = min(max(IT[node * 2].B, IT[node].B), IT[node].E);
IT[node * 2 + 1].B = min(max(IT[node * 2 + 1].B, IT[node].B), IT[node].E);
IT[node * 2].E = min(max(IT[node * 2].E, IT[node].B), IT[node].E);
IT[node * 2 + 1].E = min(max(IT[node * 2 + 1].E, IT[node].B), IT[node].E);
}
void UDT(int node){
IT[node].B = min(IT[node * 2].B, IT[node * 2 + 1].B);
IT[node].E = max(IT[node * 2].E, IT[node * 2 + 1].E);
}
void Ins(int node, int b, int e, int s, int l, int h, int ck){
if (b == s && e == l){
if (ck == 1){
IT[node].B = max(IT[node].B, h);
IT[node].E = max(IT[node].E, h);
}
else{
IT[node].B = min(IT[node].B, h);
IT[node].E = min(IT[node].E, h);
}
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...