Submission #123561

#TimeUsernameProblemLanguageResultExecution timeMemory
123561johuthaCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#ifdef _WIN32 #include "cave.h" #else #include "grader.h" #endif #include <vector> #include <iostream> using namespace std; int n; vector<int> perms; vector<int> combsol; int ask(vector<int> out) { vector<int> tos(n); for (int i = 0; i < n; i++) { if (perms[i] != -1) { tos[i] = combsol[i]; } else { tos[i] = out[i]; } } int r = tryCombination(tos.data()); return r; } int ask0() { vector<int> tos(n); for (int i = 0; i < n; i++) { if (perms[i] != -1) { tos[i] = combsol[i]; } else { tos[i] = 0; } } int r = tryCombination(tos.data()); return r; } void exploreCave(int in) { n = in; perms.resize(n, -1); combsol.resize(n, -1); int l2 = 13; for (int i = 0; i < n; i++) { int resp = 0; bool inv = (ask0() != i); int up = 1; for (int j = 0; j < l2; j++) { vector<int> out(n); for (int k = 0; k < n; k++) { out[k] = inv ^ ((k / up) % 2); } int r = ask(out); if (r != i) resp += up; up *= 2; } perms[resp] = i; combsol[resp] = !inv; } answer(combsol.data(), perms.data()); }

Compilation message (stderr)

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