# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
283680 | erd1 | The Big Prize (IOI17_prize) | C++14 | 0 ms | 0 KiB |
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 pb push_back
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
int find_best(int n) {
int l = 0, r = n;
while(true){
vector<int> res = ask(l+r>>1);
if(res[0] + res[1] == 0)
return i;
if(res[0])r = (l+r>>1);
else l = (l+r>>1)+1;
}
}