# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147623 | Bodo171 | Mechanical Doll (IOI18_doll) | C++14 | 123 ms | 15520 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 "doll.h"
#include <bits/stdc++.h>
using namespace std;
const int nmax=800005;
vector<int> C,X,Y,a,act;
int et[nmax],lf[nmax],rg[nmax],w[nmax],rly[nmax];
int p,u,ets,i,lg,reale;
void build(int nod,int l,int r)
{
if(l==r)
{
w[nod]=(act[l]!=(1<<30));
rly[nod]=act[l];
return;
}
int m=(l+r)/2;
build(2*nod,l,m);
build(2*nod+1,m+1,r);
w[nod]=w[2*nod]+w[2*nod+1];
if(w[nod]>0)
{
++reale;
rly[nod]=-reale;
X.push_back(rly[2*nod]);
Y.push_back(rly[2*nod+1]);
}
else rly[nod]=(1<<30);
}
int rev(int x,int lg)
{
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... |