# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
738392 | Abrar_Al_Samit | Rainforest Jumps (APIO21_jumps) | C++17 | 1442 ms | 45864 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;
const int nax = 200004;
const int lg = 18;
int lef[nax][lg], rit[nax][lg], hi[nax][lg];
int a[nax];
void init(int N, vector<int> H) {
for(int i=0; i<N; ++i) {
a[i] = H[i];
}
stack<int>st;
for(int i=0; i<N; ++i) {
lef[i][0] = rit[i][0] = hi[i][0] = i;
}
for(int i=0; i<N; ++i) {
while(!st.empty() && H[st.top()]<a[i]) {
rit[st.top()][0] = i;
st.pop();
}
st.push(i);
}
while(!st.empty()) st.pop();
for(int i=N-1; i>=0; --i) {
while(!st.empty() && H[st.top()]<a[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... |