# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
152813 | theboatman | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 1375 ms | 68472 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>
#define y1 theboatman
#define make_struct(args...) {args}
using namespace std;
struct tree {
int v, tl, tr;
vector <int> t;
void init(int n) {
t.resize(n * 8);
v = 1;
tl = 0, tr = n - 1;
}
void modify(int v, int tl, int tr, int pos, int val) {
if (tl == tr) {
t[v] = max(t[v], val);
}
else {
int tm = (tl + tr) / 2;
if (pos <= tm) {
modify(v * 2, tl, tm, pos, val);
}
else {
modify(v * 2 + 1, tm + 1, tr, pos, val);
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |