# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
849468 |
2023-09-14T16:18:42 Z |
TahirAliyev |
Gap (APIO16_gap) |
C++17 |
|
44 ms |
3828 KB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll findGap(int T, int N)
{
if(T == 1){
ll a, b;
MinMax(1, 1e18, &a, &b);
if(N == 2){
return b - a;
}
ll ans = 1;
ll _a, _b;
int t = 2;
while(t < N){
cout << a << ' ' << b << '\n';
_a = a, _b = b;
MinMax(a + 1, b - 1, &a, &b);
ans = max(a - _a, ans);
ans = max(_b - b, ans);
t += 2;
}
if(N % 2 == 0){
ans = max(ans, b - a);
}
return ans;
}
else{
}
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
35 | }
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
3 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
4 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
5 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
6 |
Incorrect |
1 ms |
2644 KB |
Expected EOLN |
7 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
8 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
9 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
10 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
11 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
12 |
Incorrect |
1 ms |
2516 KB |
Expected EOLN |
13 |
Incorrect |
1 ms |
2388 KB |
Expected EOLN |
14 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
15 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
16 |
Incorrect |
12 ms |
2580 KB |
Expected EOLN |
17 |
Incorrect |
9 ms |
2588 KB |
Expected EOLN |
18 |
Incorrect |
9 ms |
2588 KB |
Expected EOLN |
19 |
Incorrect |
13 ms |
2580 KB |
Expected EOLN |
20 |
Incorrect |
7 ms |
2572 KB |
Expected EOLN |
21 |
Incorrect |
36 ms |
3096 KB |
Expected EOLN |
22 |
Incorrect |
36 ms |
2848 KB |
Expected EOLN |
23 |
Incorrect |
44 ms |
3488 KB |
Expected EOLN |
24 |
Incorrect |
38 ms |
2856 KB |
Expected EOLN |
25 |
Incorrect |
32 ms |
3108 KB |
Expected EOLN |
26 |
Incorrect |
44 ms |
2908 KB |
Expected EOLN |
27 |
Incorrect |
41 ms |
2900 KB |
Expected EOLN |
28 |
Incorrect |
38 ms |
3116 KB |
Expected EOLN |
29 |
Incorrect |
39 ms |
3108 KB |
Expected EOLN |
30 |
Incorrect |
31 ms |
2876 KB |
Expected EOLN |
31 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
32 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
3 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
4 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
5 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
6 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
7 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
8 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
9 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
10 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
11 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
12 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
13 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
14 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
15 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |
16 |
Incorrect |
9 ms |
2752 KB |
Expected EOLN |
17 |
Incorrect |
9 ms |
2632 KB |
Expected EOLN |
18 |
Incorrect |
9 ms |
2584 KB |
Expected EOLN |
19 |
Incorrect |
9 ms |
2588 KB |
Expected EOLN |
20 |
Incorrect |
7 ms |
2812 KB |
Expected EOLN |
21 |
Incorrect |
36 ms |
3600 KB |
Expected EOLN |
22 |
Incorrect |
37 ms |
3828 KB |
Expected EOLN |
23 |
Incorrect |
35 ms |
3612 KB |
Expected EOLN |
24 |
Incorrect |
36 ms |
2900 KB |
Expected EOLN |
25 |
Incorrect |
33 ms |
3120 KB |
Expected EOLN |
26 |
Incorrect |
36 ms |
2864 KB |
Expected EOLN |
27 |
Incorrect |
37 ms |
3108 KB |
Expected EOLN |
28 |
Incorrect |
37 ms |
3780 KB |
Expected EOLN |
29 |
Incorrect |
37 ms |
2900 KB |
Expected EOLN |
30 |
Incorrect |
28 ms |
2896 KB |
Expected EOLN |
31 |
Incorrect |
0 ms |
2392 KB |
Expected EOLN |
32 |
Incorrect |
1 ms |
2392 KB |
Expected EOLN |