# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964079 | zxcigan | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 1194 ms | 96584 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>
using namespace std;
using ll = long long;
using ld = long double;
const int N = 1e6 + 1;
const int mod = 1e9 + 7;
template <typename T>
bool umx(T& a, T b) {
return (a < b ? a = b, 1 : 0);
}
template <typename T>
bool umn(T& a, T b) {
return (a > b ? a = b, 1 : 0);
}
int t[4 * N];
vector<array<int,3>> query[N];
void update (int v, int tl, int tr, int pos, int x) {
if (tl == tr) {
umx (t[v], x);
return;
}
int tm = (tr + tl) >> 1;
if (pos <= tm) update (v << 1, tl, tm, pos, x);
else update (v << 1 | 1, tm + 1, tr, pos, x);
t[v] = max (t[v << 1], t[v << 1 | 1]);
}
int get (int v, int tl, int tr, int l, int r) {
# | 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... |