# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
75888 | kdh9949 | Mechanical Doll (IOI18_doll) | C++17 | 207 ms | 10616 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;
static int n, m, q, v;
static vector<int> a, c, x, y, l, s;
void f(int z){
x.push_back(-1);
y.push_back(-1);
l.push_back(!z);
s.push_back(0);
if(!z) return;
int w = q;
x[w - 1] = -(++q);
f(z - 1);
y[w - 1] = -(++q);
f(z - 1);
}
void create_circuit(int M, vector<int> A) {
n = A.size(); m = M; a = A;
c = vector<int>(m + 1, -1);
for(v = 1; (1 << (v - 1)) <= n; v++){
x.push_back(-1);
y.push_back(-(v + 1));
l.push_back(0);
s.push_back(0);
}
y[--v - 1] = 0;
# | 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... |