# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
30909 | h0ngjun7 | Wall (IOI14_wall) | C++14 | 966 ms | 87072 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "wall.h"
#include <algorithm>
using namespace std;
const int MAXN = 2000005;
struct SEG {
int max, min;
} seg[4 * MAXN];
int n;
void push(int x) {
int L = x * 2, R = x * 2 + 1;
seg[L].min = min(max(seg[L].min, seg[x].min), seg[x].max);
seg[R].min = min(max(seg[R].min, seg[x].min), seg[x].max);
seg[L].max = max(min(seg[L].max, seg[x].max), seg[x].min);
seg[R].max = max(min(seg[R].max, seg[x].max), seg[x].min);
}
void query(int x, int s, int e, int l, int r, int h, int op) {
if (s > e) return;
if (e < l || r < s) return;
if (l <= s && e <= r) {
if (op == 1) {
seg[x].min = max(seg[x].min, h);
seg[x].max = max(seg[x].max, h);
}
else {
seg[x].max = min(seg[x].max, h);
# | 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... |