# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
75926 | ainta | Mechanical Doll (IOI18_doll) | C++17 | 141 ms | 20560 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<cstdio>
#include<algorithm>
#include<queue>
#define N_ 101000
using namespace std;
int n, m, Out[N_], cnt, chk[N_*10], PV;
int RR[N_ * 10][2], vv[N_*10], Num[N_*10], ReNum[N_*10];
vector<int>E[N_], TP;
void Go(int a, int L, int cur, int ed) {
if (L == 1) {
if (RR[a][cur & 1]) {
RR[RR[a][cur & 1]][0] = ed;
return;
}
RR[a][cur & 1] = ed;
return;
}
if (!RR[a][cur & 1])RR[a][cur & 1] = ++cnt;
Go(RR[a][cur & 1], L - 1, cur >> 1, ed);
}
int Make() {
int ret = cnt + 1;
int i, sz = 1, cc = 0, j;
int L = TP.size();
# | 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... |