# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1184050 | alterio | The Big Prize (IOI17_prize) | C++20 | 1 ms | 408 KiB |
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
int find_best(int n) {
int l = 0, r = n;
while (l + 1 < r) {
int mid = (l + r) / 2;
vector<int> get = ask(mid);
if (get[0] + get[1] == 0) return mid;
if (get[0] == 1) r = mid;
else l = mid;
}
return l;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |