# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
527387 | andreiomd | The Big Prize (IOI17_prize) | C++11 | 95 ms | 352 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"
using namespace std;
int find_best (int n)
{
int left = 0, right = n - 1, pos = -1;
while(left <= right)
{
int mid = ((left + right) >> 1);
vector < int > ans = ask(mid);
if(ans[0] == 0 && ans[1] == 0)
return mid;
if(ans[0] == 1)
right = mid - 1;
else left = mid + 1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |