Submission #414514

#TimeUsernameProblemLanguageResultExecution timeMemory
414514timmyfengMechanical Doll (IOI18_doll)C++17
0 / 100
301 ms262148 KiB
#include <bits/stdc++.h> using namespace std; const int N = 400000; #include "doll.h" int x[N], y[N], s; int construct(vector<int> a) { int u = ++s; if (a.size() % 2 == 1) { a.insert(a.begin(), -u); } vector<int> l, r; for (int i = 0; i < (int) a.size(); ++i) { (i % 2 == 0 ? l : r).push_back(a[i]); } x[s - 1] = construct(l); y[s - 1] = construct(r); return -u; } void create_circuit(int m, vector<int> a) { a.push_back(0); vector<int> c(m + 1, construct(a)); answer(c, vector<int>(x, x + s), vector<int>(y, y + s)); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...