Submission #101938

#TimeUsernameProblemLanguageResultExecution timeMemory
101938joylintpThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define INF 2147483647 using namespace std; int find_best(int n) { int l = -1, r = n; vector<int> res = {INF, INF}; while (1) { int tmp = (l + r) / 2; res = ask(tmp); if (res[0] > res[1]) r = tmp; else if (res[1] > res[0]) l = tmp; else return (l + r) / 2; } }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:13:15: error: 'ask' was not declared in this scope
         res = ask(tmp);
               ^~~