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;
int find_best(int n) {
int lb = 0, rb = n;
while (rb - lb > 1) {
int md = (lb + rb) / 2;
vector<int> a;
a = ask(md);
if (a[0] + a[1] == 0)return md;
if (a[0]>0)rb = md;
else lb = md;
}
return lb;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |