# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
197268 | stefdasca | Mechanical Doll (IOI18_doll) | C++14 | 145 ms | 11876 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;
int adja[400002], adjb[400002], sw = 1, tot, state[400002];
void build(int p, int st, int dr)
{
int mid = (st + dr) / 2;
if(st + 1 == dr)
{
if(tot <= mid)
adja[p] = 1;
return;
}
++sw;
adjb[p] = sw;
build(sw, st, mid);
if(tot > mid)
{
++sw;
adja[p] = sw;
build(sw, mid+1, dr);
}
else
adja[p] = 1;
}
void dfs(int nod, int val)
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... |