# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
927949 | TAhmed33 | 벽 (IOI14_wall) | C++98 | 855 ms | 57940 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define mid ((l + r) >> 1)
#define tl (node + 1)
#define tr (node + 2 * (mid - l + 1))
void chmin (int &x, int y) {
x = min(x, y);
}
void chmax(int &x, int y) {
x = max(x, y);
}
struct pp {
int mx = 0, mn = 1e9;
};
struct SegmentTree {
vector <pp> tree;
void prop (int l, int r, int node) {
if (l == r) return;
chmin(tree[tl].mn, tree[node].mn);
chmax(tree[tl].mn, tree[node].mx);
chmax(tree[tl].mx, tree[node].mx);
chmin(tree[tl].mx, tree[node].mn);
chmin(tree[tr].mn, tree[node].mn);
chmax(tree[tr].mn, tree[node].mx);
chmax(tree[tr].mx, tree[node].mx);
chmin(tree[tr].mx, tree[node].mn);
tree[node].mn = 1e9; tree[node].mx = 0;
}
void update (int l, int r, int a, int b, int h, int t, int node) {
prop(l, r, node);
# | 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... |