# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
814674 | Dan4Life | The Big Prize (IOI17_prize) | C++17 | 82 ms | 316 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
int find_best(int n) {
int pr = 0;
for(int _ = 0; _ < 500; _++){
int l = pr, r = n-1;
while(l<r){
int mid = (l+r)/2;
auto a = ask(mid);
if(a[0]+a[1]==0) return mid;
if(a[0])r=mid-1;
else l=mid+1;
}
auto a = ask(l);
if(a[0]+a[1]==0) return l;
pr = l+1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |