Submission #436568

#TimeUsernameProblemLanguageResultExecution timeMemory
436568erekleCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> #include <set> #include <algorithm> #include "grader.h" using namespace std; void exploreCave(int N) { int query[N] {}; set<int> indices; for (int i = 0; i < N; ++i) indices.insert(i); int correctPos[N], door[N]; // find switch of each door in order of doors for (int d = 0; d < N; ++d) { // find correct position of door vector<int> v(indices.begin(), indices.end()); int n = N-d; for (int i : v) query[i] = 0; int correct = (tryCombination(query) == d ? 1 : 0); int left = 0, right = n; while (right - left > 1) { int mid = (left + right) / 2; for (int i = left; i < mid; ++i) query[v[i]] = correct; for (int i = mid; i < right; ++i) query[v[i]] = 1-correct; if (tryCombination(query) == d) left = mid; else right = mid; } door[v[left]] = d; correctPos[v[left]] = correct; indices.erase(v[left]); query[v[left]] = correct; } answer(correctPos, door); }

Compilation message (stderr)

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