Submission #567381

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5673812022-05-23 11:34:00amunduzbaevRainforest Jumps (APIO21_jumps)C++17
81 / 100
4057 ms709536 KiB
#include "jumps.h"
#ifndef EVAL
#include "stub.cpp"
#endif
#include "bits/stdc++.h"
using namespace std;
const int B = 635;
const int N = 2e5 + 5;
const int M = N / B + 5;
const int lg = 18;
vector<int> edges[N];
int mx[N][lg], mn[N][lg], h[N], pos[N];
int st[N][lg], pre[N];
int lx[N], rx[N], is;
struct ST{
int tree[N << 2];
void build(int lx = 0, int rx = N - 1, int x = 1){
if(lx == rx) { tree[x] = pre[lx]; return; }
int m = (lx + rx) >> 1;
build(lx, m, x << 1);
build(m + 1, rx, x << 1 | 1);
tree[x] = min(tree[x<<1], tree[x<<1 | 1]);
}
int get(int l, int r, int lx = 0, int rx = N - 1, int x = 1){
if(lx > r || rx < l) return N;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...