제출 #648860

#제출 시각아이디문제언어결과실행 시간메모리
648860JANCARAPAN동굴 (IOI13_cave)C++17
컴파일 에러
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); }

컴파일 시 표준 에러 (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