Submission #882394

# Submission time Handle Problem Language Result Execution time Memory
882394 2023-12-03T06:30:41 Z dubabuba Gap (APIO16_gap) C++14
0 / 100
43 ms 4564 KB
#include "gap.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second

ll findGap(int T, int N) {
	ll L, R;
	MinMax(0LL, (ll)1e18 + 10, &L, &R);

	ll d = (R - L) / (ll)N;
	ll mn[N], mx[N];
	mn[0] = L, mx[N - 1] = R;

	for(int i = 0; i < N; i++)
		MinMax(L + d * i, L + d * (i + 1), &mn[i], &mx[i]);
		
	ll ans = 0;
	for(int i = 1; i < N; i++)
		ans = max(ans, mn[i] - mx[i - 1]);
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 1 ms 2392 KB Output isn't correct
3 Incorrect 0 ms 2392 KB Output isn't correct
4 Incorrect 1 ms 2392 KB Output isn't correct
5 Incorrect 0 ms 2392 KB Output isn't correct
6 Incorrect 1 ms 2392 KB Output isn't correct
7 Incorrect 0 ms 2392 KB Output isn't correct
8 Incorrect 0 ms 2392 KB Output isn't correct
9 Incorrect 1 ms 2392 KB Output isn't correct
10 Incorrect 1 ms 2392 KB Output isn't correct
11 Incorrect 1 ms 2392 KB Output isn't correct
12 Incorrect 1 ms 2392 KB Output isn't correct
13 Incorrect 2 ms 2392 KB Output isn't correct
14 Incorrect 1 ms 2388 KB Output isn't correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Incorrect 10 ms 2972 KB Output isn't correct
17 Incorrect 10 ms 2844 KB Output isn't correct
18 Incorrect 10 ms 2840 KB Output isn't correct
19 Incorrect 11 ms 2840 KB Output isn't correct
20 Incorrect 6 ms 2760 KB Output isn't correct
21 Incorrect 42 ms 4412 KB Output isn't correct
22 Incorrect 40 ms 4396 KB Output isn't correct
23 Incorrect 40 ms 4400 KB Output isn't correct
24 Incorrect 41 ms 4564 KB Output isn't correct
25 Incorrect 39 ms 4388 KB Output isn't correct
26 Incorrect 40 ms 4404 KB Output isn't correct
27 Incorrect 43 ms 4396 KB Output isn't correct
28 Incorrect 41 ms 4412 KB Output isn't correct
29 Incorrect 40 ms 4396 KB Output isn't correct
30 Incorrect 23 ms 4388 KB Output isn't correct
31 Incorrect 1 ms 2392 KB Output isn't correct
32 Incorrect 1 ms 2392 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Incorrect 1 ms 2416 KB Output isn't correct
3 Incorrect 1 ms 2392 KB Output isn't correct
4 Incorrect 0 ms 2392 KB Output isn't correct
5 Correct 1 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 0 ms 2392 KB Output isn't correct
9 Incorrect 1 ms 2392 KB Output isn't correct
10 Incorrect 0 ms 2392 KB Output isn't 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 Correct 1 ms 2392 KB Output is correct
16 Incorrect 10 ms 2844 KB Output isn't correct
17 Incorrect 10 ms 2840 KB Output isn't correct
18 Incorrect 10 ms 2848 KB Output isn't correct
19 Incorrect 11 ms 2844 KB Output isn't correct
20 Incorrect 5 ms 2828 KB Output isn't correct
21 Incorrect 40 ms 4464 KB Output isn't correct
22 Incorrect 40 ms 4388 KB Output isn't correct
23 Incorrect 41 ms 4420 KB Output isn't correct
24 Incorrect 40 ms 4400 KB Output isn't correct
25 Incorrect 40 ms 4392 KB Output isn't correct
26 Incorrect 40 ms 4400 KB Output isn't correct
27 Incorrect 41 ms 4408 KB Output isn't correct
28 Incorrect 40 ms 4400 KB Output isn't correct
29 Incorrect 40 ms 4388 KB Output isn't correct
30 Incorrect 25 ms 4436 KB Output isn't correct
31 Incorrect 1 ms 2392 KB Output isn't correct
32 Incorrect 0 ms 2392 KB Output isn't correct