Submission #648860

#TimeUsernameProblemLanguageResultExecution timeMemory
648860JANCARAPANCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; int tryCombination(vector<int> &a); void answer(vector<int> &a, vector<int> &b); void exploreCave(int n) { vector<int> pos(n), con(n); for (int i=0; i<n; i++) { // per a cada porta faig bs dels interruptors int l = i, r = n + 1; bool on = 1; while (r - l > 1) { int m = (l + r) / 2; bool can = 0; if (tryCombination(pos) == i) { on = 0; can = 1; } for (int j=i; j<m; j++) { pos[j] = 1; } if (tryCombination(pos) == i) { on = 1; can = 1; } if (can) { r = m; } else { l = r; } } pos[i] = on; con[i] = r; } answer(pos, con); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccoI5y9r.o: in function `exploreCave':
cave.cpp:(.text+0x156): undefined reference to `tryCombination(std::vector<int, std::allocator<int> >&)'
/usr/bin/ld: cave.cpp:(.text+0x1ac): undefined reference to `tryCombination(std::vector<int, std::allocator<int> >&)'
/usr/bin/ld: cave.cpp:(.text+0x20a): undefined reference to `answer(std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> >&)'
collect2: error: ld returned 1 exit status