# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
271590 | ggooroo | The Big Prize (IOI17_prize) | C++14 | 1 ms | 384 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<iostream>
using namespace std;
int n, l, r, md;
vector<int> t;
int find_best(int n) {
int i;
l = 0;
r = n;
while(l < r) {
md = (l + r) / 2;
t = ask(md);
if (t[0] == 0 && t[1] == 0) return md;
if (t[0] == 1) r = md;
else l = md + 1;
}
return r;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |