Submission #286265

#TimeUsernameProblemLanguageResultExecution timeMemory
286265ne4eHbKaMechanical Doll (IOI18_doll)C++17
Compilation error
0 ms0 KiB
#include "dool.h" #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; namespace solution { vi c, x, y; int s; vector<bool> e; int generate_switch(int p) { int i = s++; x.push_back(0); y.push_back(0); e.push_back(false); if(p) { x[i] = generate_switch(p - 1); y[i] = generate_switch(p - 1); } return -(i + 1); } void set_exit(int p, int v, int i = 0) { int &j = (e[i] ? y : x)[i]; e[i] = !e[i]; if(p) { set_exit(p - 1, v, -(j + 1)); } else { j = v; } } } void create_circuit (int m, vi a) { using namespace solution; int n = a.size(); s = 0; e.clear(); e.reserve(n * 4); x.clear(); x.reserve(n * 4); y.clear(); y.reserve(n * 4); int p = 0; for(; 1 << p < n; ++p); --p; generate_switch(p); c.assign(m + 1, -1); c[0] = a[0]; int u = 1 << p + 1; for(int i = 1; i < n; ++i) { --u; set_exit(p, a[i]); } while(u > 1) { --u; set_exit(p, -1); } set_exit(p, 0); answer(c, x, y); }

Compilation message (stderr)

doll.cpp:1:10: fatal error: dool.h: No such file or directory
    1 | #include "dool.h"
      |          ^~~~~~~~
compilation terminated.