# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
982909 | 2024-05-15T03:04:11 Z | HappyCapybara | The Big Prize (IOI17_prize) | C++17 | 40 ms | 592 KB |
#include "prize.h" #include<bits/stdc++.h> using namespace std; int find_best(int n) { int l = 0, r = n; for (int i = 0; i < 500; i++){ while (true){ int m = (l+r)/2; vector<int> res = ask(m); if (res[0]+res[1] == 0) return m; if (m == l) break; if (res[0] > i) r = m; else l = m; } l = 0; r = n; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 1 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 1 ms | 592 KB | Output is correct |
11 | Correct | 1 ms | 344 KB | Output is correct |
12 | Correct | 0 ms | 344 KB | Output is correct |
13 | Correct | 2 ms | 344 KB | Output is correct |
14 | Correct | 2 ms | 344 KB | Output is correct |
15 | Correct | 5 ms | 344 KB | Output is correct |
16 | Partially correct | 38 ms | 344 KB | Partially correct - number of queries: 7302 |
17 | Correct | 1 ms | 344 KB | Output is correct |
18 | Partially correct | 40 ms | 344 KB | Partially correct - number of queries: 8806 |
19 | Correct | 0 ms | 344 KB | Output is correct |
20 | Correct | 9 ms | 344 KB | Output is correct |
21 | Correct | 18 ms | 504 KB | Output is correct |
22 | Correct | 3 ms | 344 KB | Output is correct |
23 | Correct | 0 ms | 344 KB | Output is correct |
24 | Correct | 1 ms | 344 KB | Output is correct |
25 | Correct | 23 ms | 428 KB | Output is correct |
26 | Incorrect | 40 ms | 344 KB | Incorrect |
27 | Halted | 0 ms | 0 KB | - |