# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
947481 | starchan | Rainforest Jumps (APIO21_jumps) | C++17 | 1081 ms | 47568 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"
using namespace std;
#define in pair<int, int>
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define INF (int)1e9
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL)
const int LOGM = 19;
const int MX = 2e5+5;
vector<int> arr;
int l[LOGM][MX];
int r[LOGM][MX];
int up[LOGM][MX];
//min_jumps is now known to be correct. :)
int min_jumps(int x, int y)
{
int ans = 0;
for(int i = LOGM-1; i >= 0; i--)
{
int v = up[i][x];
if(arr[v] <= arr[y])
{
ans+=(1<<i);
x = v;
}
}
for(int i = LOGM-1; i >= 0; 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... |