제출 #841738

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8417382023-09-02 01:46:0412345678벽 (IOI14_wall)C++17
100 / 100
552 ms99464 KiB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
const int nx=2e6+5;
struct segtree
{
struct node
{
int low, up;
node(): low(0), up(INT_MAX){}
} d[4*nx];
void add(int l, int r, int i, int ql, int qr, int t)
{
if (qr<l||r<ql) return;
t=max(t, d[i].low);
t=min(t, d[i].up);
if (ql<=l&&r<=qr) return void(d[i].low=t);
int md=(l+r)/2;
add(l, md, 2*i, ql, qr, t);
add(md+1, r, 2*i+1, ql, qr, t);
}
void remove(int l, int r, int i, int ql, int qr, int t)
{
if (qr<l||r<ql) return;
t=max(t, d[i].low);
t=min(t, d[i].up);
if (ql<=l&&r<=qr) return void(d[i].up=t);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...