# include "gap.h"
# include <bits/stdc++.h>
# define x first
# define y second
# define mp make_pair
// everything go according to my plan
# define pb push_back
# define sz(a) (int)(a.size())
# define vec vector
// shimkenttin kyzdary, dzyn, dzyn, dzyn...
# define y1 Y_U_NO_y1
# define left Y_U_NO_left
# define right Y_U_NO_right
using namespace std;
typedef pair <int, int> pii;
typedef long long ll;
typedef long double ld;
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 4e18;
const int Sz = 1110111;
// a pinch of soul
const ll N = 1e18;
long findGap (int t, int n) {
ll ans = 0;
ll F, S;
MinMax (1ll, N, &F, &S);
ll len = max (1ll, (S - F - 1) / (n - 1));
ll f = F;
for (int i = 1; i <= n-2; i++) {
ll x, y;
MinMax (f + 1, f + len, &x, &y);
if (x < 0)
break;
ans = max (ans, x - f);
f = y;
}
return ans;
}
// Coded by Z..
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
476 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
476 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
484 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
484 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
504 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
528 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
528 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
576 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
592 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
636 KB |
Output isn't correct |
12 |
Incorrect |
3 ms |
636 KB |
Output isn't correct |
13 |
Incorrect |
3 ms |
636 KB |
Output isn't correct |
14 |
Incorrect |
3 ms |
636 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
636 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
764 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
764 KB |
Output isn't correct |
18 |
Incorrect |
9 ms |
764 KB |
Output isn't correct |
19 |
Incorrect |
10 ms |
764 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
764 KB |
Output isn't correct |
21 |
Incorrect |
29 ms |
1308 KB |
Output isn't correct |
22 |
Incorrect |
48 ms |
1404 KB |
Output isn't correct |
23 |
Incorrect |
29 ms |
1408 KB |
Output isn't correct |
24 |
Incorrect |
39 ms |
1408 KB |
Output isn't correct |
25 |
Incorrect |
23 ms |
1408 KB |
Output isn't correct |
26 |
Incorrect |
31 ms |
1408 KB |
Output isn't correct |
27 |
Incorrect |
30 ms |
1408 KB |
Output isn't correct |
28 |
Incorrect |
36 ms |
1408 KB |
Output isn't correct |
29 |
Incorrect |
30 ms |
1408 KB |
Output isn't correct |
30 |
Incorrect |
17 ms |
1408 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
16 |
Incorrect |
15 ms |
1408 KB |
Output isn't correct |
17 |
Incorrect |
12 ms |
1408 KB |
Output isn't correct |
18 |
Incorrect |
10 ms |
1408 KB |
Output isn't correct |
19 |
Incorrect |
10 ms |
1408 KB |
Output isn't correct |
20 |
Incorrect |
5 ms |
1408 KB |
Output isn't correct |
21 |
Incorrect |
44 ms |
1408 KB |
Output isn't correct |
22 |
Incorrect |
30 ms |
1408 KB |
Output isn't correct |
23 |
Incorrect |
29 ms |
1408 KB |
Output isn't correct |
24 |
Incorrect |
30 ms |
1408 KB |
Output isn't correct |
25 |
Incorrect |
23 ms |
1408 KB |
Output isn't correct |
26 |
Incorrect |
47 ms |
1408 KB |
Output isn't correct |
27 |
Incorrect |
31 ms |
1408 KB |
Output isn't correct |
28 |
Incorrect |
31 ms |
1408 KB |
Output isn't correct |
29 |
Incorrect |
30 ms |
1408 KB |
Output isn't correct |
30 |
Incorrect |
18 ms |
1408 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
1408 KB |
Output isn't correct |