# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
521700 | inluminas | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 3084 ms | 258844 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;
#define ll long long
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false)
#define inf LLONG_MAX
const int lmt=1e6+10;
vector<int>adj[5*lmt];
int a[lmt],mx,tree[5*lmt];
void build(int at,int L,int R){
if(L==R){
adj[at].push_back(a[L]);
return;
}
int mid=(L+R)>>1;
build(at*2,L,mid);
build(at*2+1,mid+1,R);
int res=adj[at*2].back();
int lo=0,hi=adj[at*2+1].size()-1;
while(hi-lo>1){
mid=(lo+hi)>>1;
if(adj[at*2+1][mid]<res) lo=mid;
else hi=mid;
}
tree[at]=max(tree[at*2],tree[at*2+1]);
# | 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... |