# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
837400 | mychecksedad | Rainforest Jumps (APIO21_jumps) | C++17 | 1532 ms | 81564 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>
#define ll long long int
#define mod1 (1000000000+7)
#define mod (998244353)
#define pb push_back
#define all(x) x.begin(), x.end()
#define en cout << '\n'
using namespace std;
const int N = 200000+10, K = 20;
int n, dp[N][K], R[N], A[N], up[N][K];
vector<int> T[4*N];
void build(int l, int r, int k){
if(l == r){
T[k] = {R[l]};
return;
}
int m = l+r>>1;
build(l, m, k<<1);
build(m+1, r, k<<1|1);
merge(all(T[k<<1]), all(T[k<<1|1]), back_inserter(T[k]));
}
int get_max(int l, int r, int ql, int qr, int k, int X, int Y){
if(ql > r || l > qr) return -1;
if(ql <= l && r <= qr){
int pos = upper_bound(all(T[k]), Y) - T[k].begin();
if(pos > 0){
int val = T[k][pos - 1];
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... |