제출 #823978

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8239782023-08-13 10:55:26annabeth9680Wall (IOI14_wall)C++17
100 / 100
448 ms69544 KiB
#include <bits/stdc++.h>
using namespace std;
#define MP make_pair
#define FF first
#define SS second
const int inf = 2000000011;
const pair<int,int> def = MP(-inf, inf);
int N, Q;
pair<int,int> T[8000000];
void init(int t = 1, int tl = 0, int tr = N - 1) {
if (tl == 0 && tr == N - 1)
T[t] = MP(0, 0);
else
T[t] = def;
if (tl == tr) return;
int tm = (tl + tr) >> 1;
init(t << 1, tl, tm);
init(t << 1 | 1, tm + 1, tr);
}
pair<int,int> push(pair<int,int> a, pair<int,int> b) {
if (a.SS < b.FF)
return MP(a.SS, a.SS);
if (b.SS < a.FF)
return MP(a.FF, a.FF);
return MP(max(a.FF, b.FF), min(a.SS, b.SS));
}
void pushdown(int t) {
if (T[t] != def) {
T[t << 1] = push(T[t], T[t << 1]);
T[t << 1 | 1] = push(T[t], T[t << 1 | 1]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...