Submission #647450

#TimeUsernameProblemLanguageResultExecution timeMemory
647450a_aguiloThe Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
int find_best(int n) { int lo = 0; int hi = n-1; while(hi >= lo){ int mid = lo + (hi - lo)/2; int ans[2]; ans = ask(mid); if (ans[0] == 0 and ans[1] == 0) return mid; if(ans[0] == 0){ lo = mid+1; } else hi = mid-1; } return 0; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:6:15: error: 'ask' was not declared in this scope
    6 |         ans = ask(mid);
      |               ^~~