# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
956267 |
2024-04-01T12:44:02 Z |
Nelt |
Gap (APIO16_gap) |
C++17 |
|
30 ms |
3808 KB |
#include "gap.h"
#include <bits/stdc++.h>
#define ll long long
#define endl "\n"
using namespace std;
ll findGap(int t, int n)
{
if (t == 1)
{
ll ans = 0;
ll a[n];
ll l = 0, r = 1e18, i = 0, j = n - 1;
while (l <= r)
{
MinMax(l, r, &a[i], &a[j]);
l = a[i++] + 1;
r = a[j--] - 1;
}
for (ll i = 0; i + 1 < n; i++)
ans = max(ans, a[i + 1] - a[i]);
return ans;
}
ll ans = 0;
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:24:8: warning: unused variable 'ans' [-Wunused-variable]
24 | ll ans = 0;
| ^~~
gap.cpp:24:8: warning: control reaches end of non-void function [-Wreturn-type]
24 | ll ans = 0;
| ^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Correct |
1 ms |
2392 KB |
Output is correct |
3 |
Correct |
1 ms |
2392 KB |
Output is correct |
4 |
Correct |
2 ms |
2392 KB |
Output is correct |
5 |
Correct |
0 ms |
2392 KB |
Output is correct |
6 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Correct |
1 ms |
2392 KB |
Output is correct |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
7 ms |
2584 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
2584 KB |
Output isn't correct |
18 |
Incorrect |
7 ms |
2584 KB |
Output isn't correct |
19 |
Incorrect |
7 ms |
2588 KB |
Output isn't correct |
20 |
Correct |
6 ms |
2568 KB |
Output is correct |
21 |
Incorrect |
28 ms |
3624 KB |
Output isn't correct |
22 |
Incorrect |
29 ms |
3392 KB |
Output isn't correct |
23 |
Incorrect |
28 ms |
3636 KB |
Output isn't correct |
24 |
Incorrect |
28 ms |
3552 KB |
Output isn't correct |
25 |
Incorrect |
25 ms |
3624 KB |
Output isn't correct |
26 |
Incorrect |
28 ms |
3628 KB |
Output isn't correct |
27 |
Incorrect |
28 ms |
3628 KB |
Output isn't correct |
28 |
Incorrect |
30 ms |
3644 KB |
Output isn't correct |
29 |
Incorrect |
28 ms |
3628 KB |
Output isn't correct |
30 |
Correct |
23 ms |
3624 KB |
Output is correct |
31 |
Correct |
1 ms |
2392 KB |
Output is correct |
32 |
Correct |
0 ms |
2392 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
2 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
3 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
4 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
5 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
6 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
7 ms |
2580 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
2584 KB |
Output isn't correct |
18 |
Incorrect |
7 ms |
2588 KB |
Output isn't correct |
19 |
Incorrect |
7 ms |
2580 KB |
Output isn't correct |
20 |
Partially correct |
6 ms |
2568 KB |
Partially correct |
21 |
Incorrect |
28 ms |
3628 KB |
Expected int32, but "2500100001" found |
22 |
Incorrect |
29 ms |
3652 KB |
Expected int32, but "2500100001" found |
23 |
Incorrect |
30 ms |
3628 KB |
Expected int32, but "2500100001" found |
24 |
Incorrect |
28 ms |
3808 KB |
Expected int32, but "2500100001" found |
25 |
Incorrect |
25 ms |
3652 KB |
Expected int32, but "2500100001" found |
26 |
Incorrect |
28 ms |
3648 KB |
Expected int32, but "2500100001" found |
27 |
Incorrect |
28 ms |
3628 KB |
Expected int32, but "2500100001" found |
28 |
Incorrect |
28 ms |
3628 KB |
Expected int32, but "2500100001" found |
29 |
Incorrect |
28 ms |
3796 KB |
Expected int32, but "2500100001" found |
30 |
Incorrect |
23 ms |
3624 KB |
Expected int32, but "2500100000" found |
31 |
Partially correct |
1 ms |
2392 KB |
Partially correct |
32 |
Partially correct |
1 ms |
2392 KB |
Partially correct |