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