# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799766 | 2023-08-01T00:08:35 Z | Liudas | The Big Prize (IOI17_prize) | C++17 | 38 ms | 384 KB |
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int N){ int step = 50; int s = 1; int ans = 0; int mb = 0; int l = 0, r = N - 1; //cout << step << endl; for(int i = 0; i < N && s; i += step){ int p = min(r, i + step); int tb = 0; int t = 1; for(; p >= i && t; p --){ auto k = ask(p); t = k[0] - mb; tb = max(tb, k[0]); s = k[0] + k[1]; //cout << p << " " << k[0] << " " << k[1] << endl; } mb = max(tb, mb); l = p + 1; } return l; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 208 KB | Output is correct |
2 | Correct | 16 ms | 208 KB | Output is correct |
3 | Correct | 7 ms | 292 KB | Output is correct |
4 | Correct | 38 ms | 292 KB | Output is correct |
5 | Correct | 7 ms | 288 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 15 ms | 208 KB | Output is correct |
8 | Correct | 19 ms | 208 KB | Output is correct |
9 | Correct | 15 ms | 208 KB | Output is correct |
10 | Correct | 27 ms | 208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 292 KB | Output is correct |
2 | Correct | 23 ms | 296 KB | Output is correct |
3 | Correct | 7 ms | 292 KB | Output is correct |
4 | Correct | 32 ms | 296 KB | Output is correct |
5 | Correct | 7 ms | 292 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 18 ms | 296 KB | Output is correct |
8 | Correct | 17 ms | 208 KB | Output is correct |
9 | Correct | 12 ms | 384 KB | Output is correct |
10 | Correct | 34 ms | 208 KB | Output is correct |
11 | Incorrect | 20 ms | 292 KB | answer is not correct |
12 | Halted | 0 ms | 0 KB | - |