# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
558610 | pakhomovee | Rainforest Jumps (APIO21_jumps) | C++17 | 1611 ms | 208192 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 <vector>
#include <algorithm>
#include <iostream>
using namespace std;
const int maxn = 1 << 20;
struct segTreeMax {
pair<int, int> tree[maxn];
void build(int i, int l, int r, vector<int> & h) {
if (l + 1 == r) {
tree[i] = { h[l], l };
return;
}
int m = (l + r) / 2;
build(i * 2 + 1, l, m, h);
build(i * 2 + 2, m, r, h);
tree[i] = max(tree[i * 2 + 1], tree[i * 2 + 2]);
}
pair<int, int> get(int i, int l, int r, int ql, int qr) {
if (qr <= l || r <= ql) {
return { -1, -1 };
}
if (ql <= l && r <= qr) {
return tree[i];
# | 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... |