# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
722423 | 2023-04-11T23:10:40 Z | perohero | The Big Prize (IOI17_prize) | C++17 | 1 ms | 336 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 288 KB | Output is correct |
3 | Correct | 1 ms | 292 KB | Output is correct |
4 | Correct | 1 ms | 292 KB | Output is correct |
5 | Correct | 0 ms | 208 KB | Output is correct |
6 | Incorrect | 1 ms | 336 KB | Integer 6098968 violates the range [0, 199999] |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 296 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 0 ms | 292 KB | Output is correct |
6 | Incorrect | 1 ms | 292 KB | Integer 6098968 violates the range [0, 199999] |
7 | Halted | 0 ms | 0 KB | - |