Submission #347035

#TimeUsernameProblemLanguageResultExecution timeMemory
347035PetyFinding Routers (IOI20_routers)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<int> find_routers (int l, int n, int q) { vector<int>p; p.resize(n); for (int i = 1; i < n; i++) { int st = p[i - 1], dr = l, poz = 0; while (st <= dr) { int mij = (st + dr) / 2; if (use_detector(mij) == i - 1) { st = mij + 1; poz = mij; } else dr = mij - 1; } p[i] = p[i - 1] + 2* (poz - p[i - 1]); } return p; } /*int main () { return 0; }*/

Compilation message (stderr)

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:12:11: error: 'use_detector' was not declared in this scope
   12 |       if (use_detector(mij) == i - 1) {
      |           ^~~~~~~~~~~~