# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1027738 |
2024-07-19T09:33:53 Z |
stdfloat |
Gap (APIO16_gap) |
C++17 |
|
23 ms |
5516 KB |
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;
using ll = long long;
ll findGap(int T, int N) {
ll s, t;
MinMax(0, (ll)1e18, &s, &t);
int cnt = 1;
ll ans = LLONG_MAX;
while (N > 2 && s + 1 < t) {
cnt++;
assert(cnt <= (N + 1) / 2 && (N & 1));
ll x, y;
MinMax(s + 1, t - 1, &x, &y);
if (x == -1) break;
ans = min({ans, x - s, t - y});
s = x; t = y; N -= 2;
}
return min(ans, (s < t ? t - s : LLONG_MAX));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
3 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
4 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
5 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
6 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
7 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
8 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
9 |
Runtime error |
1 ms |
4696 KB |
Execution killed with signal 6 |
10 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
11 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
12 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
13 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
14 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
15 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
16 |
Runtime error |
5 ms |
4952 KB |
Execution killed with signal 6 |
17 |
Runtime error |
5 ms |
4952 KB |
Execution killed with signal 6 |
18 |
Runtime error |
5 ms |
4952 KB |
Execution killed with signal 6 |
19 |
Runtime error |
5 ms |
4804 KB |
Execution killed with signal 6 |
20 |
Runtime error |
4 ms |
4952 KB |
Execution killed with signal 6 |
21 |
Runtime error |
23 ms |
5292 KB |
Execution killed with signal 6 |
22 |
Runtime error |
15 ms |
5464 KB |
Execution killed with signal 6 |
23 |
Runtime error |
11 ms |
5300 KB |
Execution killed with signal 6 |
24 |
Runtime error |
13 ms |
5508 KB |
Execution killed with signal 6 |
25 |
Runtime error |
15 ms |
5464 KB |
Execution killed with signal 6 |
26 |
Runtime error |
12 ms |
5464 KB |
Execution killed with signal 6 |
27 |
Runtime error |
12 ms |
5396 KB |
Execution killed with signal 6 |
28 |
Runtime error |
12 ms |
5464 KB |
Execution killed with signal 6 |
29 |
Runtime error |
12 ms |
5408 KB |
Execution killed with signal 6 |
30 |
Runtime error |
8 ms |
5420 KB |
Execution killed with signal 6 |
31 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
32 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
3 |
Runtime error |
2 ms |
4532 KB |
Execution killed with signal 6 |
4 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
5 |
Runtime error |
1 ms |
4696 KB |
Execution killed with signal 6 |
6 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
7 |
Runtime error |
3 ms |
4696 KB |
Execution killed with signal 6 |
8 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
9 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
10 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
11 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
12 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
13 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
14 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
15 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
16 |
Runtime error |
4 ms |
4788 KB |
Execution killed with signal 6 |
17 |
Runtime error |
5 ms |
4952 KB |
Execution killed with signal 6 |
18 |
Runtime error |
6 ms |
4784 KB |
Execution killed with signal 6 |
19 |
Runtime error |
5 ms |
4792 KB |
Execution killed with signal 6 |
20 |
Runtime error |
4 ms |
4952 KB |
Execution killed with signal 6 |
21 |
Runtime error |
19 ms |
5296 KB |
Execution killed with signal 6 |
22 |
Runtime error |
14 ms |
5516 KB |
Execution killed with signal 6 |
23 |
Runtime error |
15 ms |
5464 KB |
Execution killed with signal 6 |
24 |
Runtime error |
12 ms |
5464 KB |
Execution killed with signal 6 |
25 |
Runtime error |
10 ms |
5464 KB |
Execution killed with signal 6 |
26 |
Runtime error |
13 ms |
5300 KB |
Execution killed with signal 6 |
27 |
Runtime error |
12 ms |
5468 KB |
Execution killed with signal 6 |
28 |
Runtime error |
12 ms |
5476 KB |
Execution killed with signal 6 |
29 |
Runtime error |
11 ms |
5404 KB |
Execution killed with signal 6 |
30 |
Runtime error |
8 ms |
5476 KB |
Execution killed with signal 6 |
31 |
Runtime error |
3 ms |
4708 KB |
Execution killed with signal 6 |
32 |
Runtime error |
4 ms |
4708 KB |
Execution killed with signal 6 |