# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
766926 | birktj | Mechanical Doll (IOI18_doll) | C++14 | 72 ms | 13860 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 <iostream>
#include <algorithm>
using namespace std;
bool used[400000];
int map[400000];
void print_tree(int i, int indent, vector<int> &X, vector<int> &Y) {
if (i >= X.size()) return;
cerr << string(indent*2, ' ') << -i << ": x = " << X[i-1] << " y = " << Y[i-1] << " used = " << used[i-1] << endl;
print_tree(i*2, indent+1, X, Y);
print_tree(i*2+1, indent+1, X, Y);
}
int get_num(int i, int d, int acc) {
if (d == 0) return acc;
return get_num(i / 2, d-1, acc*2 + i%2);
}
void create_circuit(int M, vector<int> A) {
vector<int> C(M + 1, -1);
C[0] = A[0];
int n = A.size();
if (n == 1) {
C[A[0]] = 0;
answer(C, {}, {});
return;
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... |