# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
567402 | Bill_00 | Rainforest Jumps (APIO21_jumps) | C++14 | 1238 ms | 45556 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>
#include <vector>
using namespace std;
int best[200005][25], rightt[200005][25], h[200005], n, tallest[2000000], L[200005];
void update(int id, int l, int r, int pos, int val){
if(h[val] > h[tallest[id]]){
tallest[id] = val;
}
if(l == r){
return;
}
int m = l + r >> 1;
if(m >= pos){
update(id * 2, l, m, pos, val);
}
else update(id * 2 + 1, m + 1, r, pos, val);
}
int query(int id, int l, int r, int lef, int rig){
if(lef > rig) return 200004;
if(r < lef || rig < l) return 200004;
if(lef <= l && r <= rig) return tallest[id];
int m = l + r >> 1;
int lll = query(id * 2, l, m, lef, rig);
int rrr = query(id * 2 + 1, m + 1, r, lef, rig);
return (h[lll] > h[rrr] ? lll : rrr);
}
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... |