# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971464 | Pannda | Rainforest Jumps (APIO21_jumps) | C++17 | 4032 ms | 32856 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 "jumps.h"
#include <bits/stdc++.h>
using namespace std;
struct SegmentTree {
int n;
vector<int> mx;
vector<int> mn;
SegmentTree() {}
SegmentTree(vector<int> a) : n(a.size()), mx(4 * n), mn(4 * n) {
auto dfs = [&](auto self, int idx, int l, int r) -> void {
if (l + 1 == r) {
mn[idx] = mx[idx] = a[l];
} else {
int m = (l + r) >> 1;
self(self, 2 * idx + 1, l, m);
self(self, 2 * idx + 2, m, r);
mn[idx] = min(mn[2 * idx + 1], mn[2 * idx + 2]);
mx[idx] = max(mx[2 * idx + 1], mx[2 * idx + 2]);
}
};
dfs(dfs, 0, 0, n);
}
int find(int ql, int qr, int ub, int rb) {
auto walk = [&](auto self, int idx, int l, int r) -> int {
if (rb <= l) return -1;
if (mx[idx] < ub) return -1;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |