# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1195930 | clementine | The Big Prize (IOI17_prize) | C++20 | 0 ms | 408 KiB |
#include "prize.h"
#include<bits/stdc++.h>
using namespace std;
int find_best(int n) {
int l = 0;
int r = n-1;
while(l != r)
{
int mid = (l + r) / 2;
auto res = ask(mid);
if(res[0] == 0 && res[1] == 0)
{
return mid;
}
if(res[0] == 1)
{
r = mid;
}
else
{
l = mid + 1;
}
}
return l;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |