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