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 <bits/stdc++.h>
#include "prize.h"
using namespace std;
int find_best(int n) {
int minn = 0;
int maxx = n-1;
while (minn <= maxx)
{
int med = (minn + maxx)/2;
vector<int> v = ask(med);
if (v[0] == 0 and v[1] == 0)
{
return med;
}
if (v[0] == 0 and v[1] == 1)
{
minn = med + 1;
}
else
{
maxx = med - 1;
}
}
return minn;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |