# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
770989 | The_Samurai | Rabbit Carrot (LMIO19_triusis) | C++17 | 200 ms | 15304 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;
struct segtree {
int size, neutral_element = -inf;
vector<int> tree;
void init(int n) {
size = 1;
while (size < n) size *= 2;
tree.assign(2 * size - 1, neutral_element);
}
int get(int l, int r, int x, int lx, int rx) {
if (l >= rx or lx >= r) {
return neutral_element;
}
if (l <= lx and rx <= r) {
return tree[x];
}
int m = (lx + rx) >> 1;
return max(get(l, r, 2 * x + 1, lx, m), get(l, r, 2 * x + 2, m, rx));
}
int get(int l, int r) {
return get(l, r + 1, 0, 0, size);
}
# | 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... |