# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
722423 | tvladm2009 | The Big Prize (IOI17_prize) | C++17 | 1 ms | 336 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 <bits/stdc++.h>
#include "prize.h"
using namespace std;
typedef long long ll;
int find_best(int N) {
int l = 1, r = N, sol;
while (l <= r) {
int mid = (l + r) / 2;
vector <int> cnt = ask(mid);
if (cnt[0] == 0 && cnt[1] == 0) {
return mid;
}
if (cnt[0] < cnt[1]) {
sol = mid;
l = mid + 1;
} else {
r = mid - 1;
}
}
return sol;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |