Submission #508839

#TimeUsernameProblemLanguageResultExecution timeMemory
508839tabrCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif int tryCombination(int[]); int answer(int[], int[]); void exploreCave(int n) { int a[5000] = {}; int b[5000] = {}; vector<int> c; for (int i = 0; i < n; i++) { c.emplace_back(i); } for (int i = 0; i < n; i++) { for (int j : c) { a[j] = 0; } int k = 0; if (tryCombination(a) != i) { k = 1; } int lo = 0; int hi = (int) c.size(); while (hi - lo > 1) { int mid = (hi + lo) / 2; for (int j = 0; j < (int) c.size(); j++) { if (j < mid) { a[j] = k ^ 1; } else { a[j] = k; } } if (tryCombination(a) == i) { hi = mid; } else { lo = mid; } } a[hi] = k; b[i] = hi; c.erase(c.begin() + hi); } answer(a, b); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccQzwJav.o: in function `exploreCave(int)':
cave.cpp:(.text+0x128): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x1a5): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x221): undefined reference to `answer(int*, int*)'
/usr/bin/ld: /tmp/ccxqETZw.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
collect2: error: ld returned 1 exit status