Submission #104410

#TimeUsernameProblemLanguageResultExecution timeMemory
104410BadralThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "prize.h" using namespace std; int can(int k) { vector<int> cer = ask(k); if(cer[0] == 0 && cer[1] == 0) return 2; return (cer[0] == 0); } int find_best(int n, int kk = 0) { for(int i = n/2; i >= 1; i /= 2) { while(true) { int p = can(i+kk); if(p == 2) return (i+kk); if(p == 1 && kk+i <= n) kk += i; else break; } } return kk; }

Compilation message (stderr)

/tmp/ccRlnpIj.o: In function `main':
grader.cpp:(.text.startup+0xa8): undefined reference to `find_best(int)'
collect2: error: ld returned 1 exit status