Submission #507583

#TimeUsernameProblemLanguageResultExecution timeMemory
507583HanksburgerThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int find_best(int N) { int L=0, R=N-1; while (L<R) { int mid=(L+R)/2; vector<int> res=ask(mid); if (res[0]) R=mid-1; else if (res[1]) L=mid+1; else return mid; } return L; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:9:19: error: 'ask' was not declared in this scope
    9 |   vector<int> res=ask(mid);
      |                   ^~~