# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
540333 | schiftyfive4 | Wall (IOI14_wall) | C++14 | 1405 ms | 149208 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
const int inf = 2e9;
template<class T>
struct SegTree {
int n;
vector<T> t, tag;
SegTree(int _) {
n = _;
t.resize(4 * n, {0, 0});
tag.resize(4 * n, {0, inf});
}
void apply(T &x, T &val) {
if (x.first <= val.first && val.second <= x.second) {
x = val;
} else if (x.second <= val.first) {
x.first = val.first;
x.second = val.first;
} else if (x.first >= val.second) {
x.first = val.second;
x.second = val.second;
} else if (x.first <= val.first && val.first <= x.second && x.second <= val.second) {
x.first = val.first;
} else if (val.first <= x.first && x.first <= val.second && val.second <= x.second) {
x.second = val.second;
}
}
# | 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... |