# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
879055 | The_Samurai | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 926 ms | 141448 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;
const int inf = 1e9;
const int lg = 20;
template<typename T> struct SegTree {
vector<T> tree;
int size;
T neutral_element = -1e9; // sum - 0, mx - (-INF), mn - INF
void init(int n) {
size = 1;
while (size <= n) size *= 2;
tree.assign(2 * size, neutral_element);
}
inline T type(T a, T b) {
return max(a, b);
}
SegTree(int n) {
init(n);
}
SegTree() {}
void set(int p, int value) { // set value at position p
p += size;
tree[p] = type(value, tree[p]);
# | 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... |