# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80287 | MoNsTeR_CuBe | The Big Prize (IOI17_prize) | C++17 | 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;
int find_best(int n) {
int left = 0;
int right = n-1;
while(left < right){
int mid = (left+right)/2;
int tab[] = ask(mid);
if(tab[0]==1){
right = mid-1;
}else if(tab[0] == 1){
left = mid+1;
}else{
right = mid;
break;
}
}
return right;
}