# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
47640 |
2018-05-06T07:05:10 Z |
E869120 |
Gap (APIO16_gap) |
C++14 |
|
82 ms |
2300 KB |
#include "gap.h"
#include <algorithm>
using namespace std;
long long a[100009];
long long findGap(int T, int N)
{
if (T == 1) {
long long L = 0, R = 1000000000000000000LL, s, t, cnt = 0;
while (cnt <= (N + 1) / 2) {
MinMax(L, R, &s, &t);
L = s; R = t;
if (L != -1) { a[cnt + 1] = L; a[N - cnt] = R; }
cnt++; L++; R--;
}
long long maxn = 0;
for (int i = 1; i <= N - 1; i++) maxn = max(maxn, a[i + 1] - a[i]);
return maxn;
}
if (T == 2) {
long long L = 0, R = 1000000000000000000LL, s, t, cnt = 0;
while (cnt <= (N + 1) / 2) {
MinMax(L, R, &s, &t);
L = s; R = t;
if (L != -1) { a[cnt + 1] = L; a[N - cnt] = R; }
cnt++; L++; R--;
}
long long maxn = 0;
for (int i = 1; i <= N - 1; i++) maxn = max(maxn, a[i + 1] - a[i]);
return maxn;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Runtime error |
2 ms |
488 KB |
Execution failed because the return code was nonzero |
3 |
Runtime error |
2 ms |
544 KB |
Execution failed because the return code was nonzero |
4 |
Runtime error |
2 ms |
544 KB |
Execution failed because the return code was nonzero |
5 |
Runtime error |
2 ms |
544 KB |
Execution failed because the return code was nonzero |
6 |
Incorrect |
2 ms |
544 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
544 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
544 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
544 KB |
Output isn't correct |
10 |
Runtime error |
2 ms |
544 KB |
Execution failed because the return code was nonzero |
11 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
16 |
Incorrect |
15 ms |
1000 KB |
Output isn't correct |
17 |
Incorrect |
15 ms |
1000 KB |
Output isn't correct |
18 |
Incorrect |
15 ms |
1000 KB |
Output isn't correct |
19 |
Incorrect |
22 ms |
1000 KB |
Output isn't correct |
20 |
Runtime error |
11 ms |
1000 KB |
Execution failed because the return code was nonzero |
21 |
Incorrect |
60 ms |
2152 KB |
Output isn't correct |
22 |
Incorrect |
82 ms |
2180 KB |
Output isn't correct |
23 |
Incorrect |
56 ms |
2180 KB |
Output isn't correct |
24 |
Incorrect |
57 ms |
2180 KB |
Output isn't correct |
25 |
Incorrect |
48 ms |
2180 KB |
Output isn't correct |
26 |
Incorrect |
56 ms |
2280 KB |
Output isn't correct |
27 |
Incorrect |
76 ms |
2280 KB |
Output isn't correct |
28 |
Incorrect |
56 ms |
2280 KB |
Output isn't correct |
29 |
Incorrect |
56 ms |
2280 KB |
Output isn't correct |
30 |
Runtime error |
42 ms |
2280 KB |
Execution failed because the return code was nonzero |
31 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
32 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2280 KB |
Output is correct |
2 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
3 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
4 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
5 |
Runtime error |
1 ms |
2280 KB |
Execution failed because the return code was nonzero |
6 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
7 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
8 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
9 |
Partially correct |
1 ms |
2280 KB |
Partially correct |
10 |
Runtime error |
2 ms |
2280 KB |
Execution failed because the return code was nonzero |
11 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
12 |
Partially correct |
3 ms |
2280 KB |
Partially correct |
13 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
14 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
15 |
Partially correct |
2 ms |
2280 KB |
Partially correct |
16 |
Partially correct |
15 ms |
2280 KB |
Partially correct |
17 |
Partially correct |
15 ms |
2280 KB |
Partially correct |
18 |
Partially correct |
15 ms |
2280 KB |
Partially correct |
19 |
Partially correct |
15 ms |
2280 KB |
Partially correct |
20 |
Runtime error |
11 ms |
2280 KB |
Execution failed because the return code was nonzero |
21 |
Incorrect |
56 ms |
2280 KB |
Expected int32, but "2500100001" found |
22 |
Incorrect |
56 ms |
2280 KB |
Expected int32, but "2500100001" found |
23 |
Incorrect |
56 ms |
2280 KB |
Expected int32, but "2500100001" found |
24 |
Incorrect |
56 ms |
2280 KB |
Expected int32, but "2500100001" found |
25 |
Incorrect |
49 ms |
2300 KB |
Expected int32, but "2500100001" found |
26 |
Incorrect |
59 ms |
2300 KB |
Expected int32, but "2500100001" found |
27 |
Incorrect |
56 ms |
2300 KB |
Expected int32, but "2500100001" found |
28 |
Incorrect |
59 ms |
2300 KB |
Expected int32, but "2500100001" found |
29 |
Incorrect |
57 ms |
2300 KB |
Expected int32, but "2500100001" found |
30 |
Runtime error |
42 ms |
2300 KB |
Execution failed because the return code was nonzero |
31 |
Runtime error |
2 ms |
2300 KB |
Execution failed because the return code was nonzero |
32 |
Runtime error |
2 ms |
2300 KB |
Execution failed because the return code was nonzero |