Submission #286178

#TimeUsernameProblemLanguageResultExecution timeMemory
286178ne4eHbKaMechanical Doll (IOI18_doll)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; namespace solution { typedef vector<int> vi; map<int, list<int> > f; vi c, x, y; int s; int swicch(list<int> &t) { int i = s++; x.push_back(0); y.push_back(0); list<int> a, b; int cnt = 0; for(int &j : t) (cnt++ & 1 ? b : a).push_back(j); x[i] = a.size() - 1 ? swicch(a) : a.front(); y[i] = b.size() - 1 ? swicch(b) : b.front(); return -(i + 1); } void trigger(int i) { if(f.find(i) == f.end()) { c[i] = 0; return; } list<int> &t = f[i]; if(t.size() == 1) { c[i] = t.front(); return; } c[i] = swicch(t); } } void create_circuit (int m, ints a) { using namespace solution; int n = a.size(); f.clear(); for(int i = 1; i < n; ++i) f[a[i - 1]].push_back(a[i]); f[a.back()].push_back(0); c.resize(m + 1); x.clear(); y.clear(); s = 0; c[0] = a.front(); for(int i = 1; i <= m; ++i) trigger(i); answer(c, x, y); }

Compilation message (stderr)

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