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"
#define ll long long
#define fi first
#define se second
using namespace std;
int find_best(int n) {
int l=0,r=n+1;
/*vector<int>w=ask(0);
if(n<=2){
if(w[0]+w[1]==0)
{
return 0;
}
else return 1;
}*/
while(l<r)
{
int m=(l+r)/2;
vector<int>v=ask(m);
if(v[0]==0)
l=m+1;
else r=m;
}return l-1;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |