# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986563 | ZHIRDILBILDIZ | Rainforest Jumps (APIO21_jumps) | C++14 | 851 ms | 66488 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>
#include "jumps.h"
#define fi first
#define se second
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
using namespace std;
const int N = 2e5 + 10;
int pw[N];
int rg[N][20];
int lf[N][20];
int mx[N][20];
int path[N][20];
vector<int> _h;
void build_sparce (vector<int> h) {
for (int i = 2; i <= h.size(); ++i) pw[i] = pw[i >> 1] + 1;
for (int i = 0; i < h.size(); ++i) mx[i][0] = h[i];
for (int i = 1; i < 20; ++i)
for (int j = 0; j <= (int)h.size() - (1 << i); ++j)
mx[j][i] = max(mx[j][i - 1], mx[j + (1 << (i - 1))][i - 1]);
}
int get_max (int l, int r) {
if (l > r) swap(l, r);
int x = pw[r - l + 1];
Compilation message (stderr)
# | 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... |