# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1049515 | Maite_Morale | Rainforest Jumps (APIO21_jumps) | C++17 | 735 ms | 225088 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>
using namespace std;
typedef long long ll;
#define vll vector<ll>
#define MAX 500005
#define pll pair<ll,ll>
#define oo 10000000000000
#define F first
#define S second
const ll bts=20;
pll p[MAX],s[bts+10][MAX],t[bts+10][MAX];
vll v[MAX];
ll d[MAX],N;
pll query(ll x,ll y){
if(x>y)return {0,N};
ll c=log2l(abs(x-y)+1);
return max(t[c][x],t[c][y-(1LL<<c)+1]);
}
void dfs(ll x,ll y){
d[x]=d[y]+1;
for(auto w : v[x])dfs(w,x);
}
void init(int n, std::vector<int> h) {
h.push_back(oo);
stack<ll> s1;s1.push(n);
for(int i=0;i<n;i++){
t[0][i]={h[i],i};
while(h[i]>h[s1.top()]){
p[s1.top()].S=i;
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... |