# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
260939 | my99n | Wall (IOI14_wall) | C++14 | 866 ms | 69688 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 "wall.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000100;
struct A {
int mn, mx;
} seg[4*MAXN];
int* ans, N;
void tag (int now, int mn, int mx) {
// cerr << "tag" << now << ' ' << mn << ' ' << mx << endl;
seg[now].mn = min(mx, max(mn, seg[now].mn));
seg[now].mx = max(mn, min(mx, seg[now].mx));
}
void push (int now, int l, int r) {
if (l == r) {
ans[l] = min(seg[now].mx, max(seg[now].mn, ans[l]));
}
else {
tag(now*2, seg[now].mn, seg[now].mx);
tag(now*2+1, seg[now].mn, seg[now].mx);
}
seg[now].mn = 0;
seg[now].mx = 1e9;
}
# | 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... |