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