# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
253391 | ChrisT | 벽 (IOI14_wall) | C++17 | 757 ms | 110268 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "wall.h"
using namespace std;
const int MN = 2e6+5;
#define lc ind<<1
#define rc ind<<1|1
struct Node {
int l,r,mx,mn;
} tree[MN<<2];
int ans[MN];
int le[MN], ri[MN], o[MN], he[MN], f[MN];
void build (int ind, int l, int r) {
tree[ind] = {l,r,0,INT_MAX};
if (l == r) return;
int mid = (l+r)>>1;
build(lc,l,mid), build(rc,mid+1,r);
}
void remove (int ind, int v) {
tree[ind].mn = min(tree[ind].mn,v);
tree[ind].mx = min(tree[ind].mx,v);
}
void add (int ind, int v) {
tree[ind].mx = max(tree[ind].mx,v);
tree[ind].mn = max(tree[ind].mn,v);
}
void push_down (int ind) {
if (tree[ind].l == tree[ind].r) return;
add(lc,tree[ind].mx);
remove(lc,tree[ind].mn);
add(rc,tree[ind].mx);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |