# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
412480 | tatyam | Rainforest Jumps (APIO21_jumps) | C++17 | 1563 ms | 45088 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;
void chmax(int& a, int b){ if(a < b) a = b; }
int N;
vector<int> H, RMQ, idx;
vector<vector<int>> low, high;
int get(int l, int r){
int ans = 0;
for(l += N, r += N; l < r; l >>= 1, r >>= 1){
if(l & 1) chmax(ans, RMQ[l++]);
if(r & 1) chmax(ans, RMQ[--r]);
}
return ans;
}
int get_idx(int l, int r){
int ans = N;
for(l += N, r += N; l < r; l >>= 1, r >>= 1){
if(l & 1){
if(H[ans] < H[idx[l]]) ans = idx[l];
l++;
}
if(r & 1){
r--;
if(H[ans] < H[idx[r]]) ans = idx[r];
}
}
return ans;
}
# | 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... |