# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
559015 | LastRonin | Rainforest Jumps (APIO21_jumps) | C++14 | 1092 ms | 47944 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>
#define ll long long
#define pii pair<int, int>
#define f first
#define s second
using namespace std;
const int N = 2e5 + 10;
int bp[N][18];
int bp2[N][18];
int bp3[N][18];
int z[N], h[N];
int Le[N], Ri[N];
void init(int n, vector<int> H) {
for(int j = 1; j <= n; j++)
h[j] = H[j - 1];
stack<int> L, R;
for(int j = 1; j <= n; j++)
z[h[j]] = j;
for(int i = 1; i <= n; i++) {
while(L.size() && L.top() <= h[i])L.pop();
if(L.size())
Le[i] = L.top();
L.push(h[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... |