| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365555 | settop | Rainforest Jumps (APIO21_jumps) | C++20 | 3517 ms | 13756 KiB |
#include "jumps.h"
#include<bits/stdc++.h>
using namespace std;
#define fall(i,a,b) for(int i=a;i<=b;i++)
#define rfall(i,a,b) for(int i=a;i>=b;i--)
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define pb push_back
const int MAXN=2e5+10;
int n;
vector<int> g[MAXN];
void init(int N, std::vector<int> H) {
n=N;
stack<int> st;
fall(i,0,n-1){
while(sz(st)){
auto x=st.top();
if(H[x]>H[i]) break;
st.pop();
}
if(sz(st)) g[i].pb(st.top());
st.push(i);
}
while(sz(st)) st.pop();
rfall(i,n-1,0){
while(sz(st)){
auto x=st.top();
if(H[x]>H[i]) break;
st.pop();
}
if(sz(st)) g[i].pb(st.top());
st.push(i);
}
}
int minimum_jumps(int A, int B, int C, int D){
vector<int> dp(n,n+10);
return C-B;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
