This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "prize.h"
using namespace std;
typedef vector<int> vi;
int find_best(int n) {
int l=0,r=n-1,pos=0;
while(l<=r)
{
int mid=(l+r)>>1;
vi res=ask(mid);
if(res[1]==0)
{
pos=mid;
r=mid-1;
}
else
l=mid+1;
}
return pos;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |