# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251492 | nvmdava | Sky Walking (IOI19_walk) | C++17 | 2063 ms | 156668 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 "walk.h"
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ll long long
#define ss second
const int N = 1000'005;
vector<int> br[N];
vector<pair<int, int> > adj[N];
int mx[N];
int n;
void build(vector<int>& h, int id, int l, int r){
if(l == r){
mx[id] = h[l];
return;
}
int m = (l + r) >> 1;
build(h, id << 1, l, m);
build(h, id << 1 | 1, m + 1, r);
mx[id] = max(mx[id << 1], mx[id << 1 | 1]);
}
int find_right(int id, int l, int r, int L, int R, int x){
if(L > r || R < l) return -1;
if(L <= l && r <= R){
if(mx[id] < x) return -1;
if(l == r) return r;
int m = (l + r) >> 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... |