답안 #882390

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
882390 2023-12-03T06:27:04 Z dubabuba Gap (APIO16_gap) C++14
0 / 100
46 ms 4648 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, &L, &R);

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

	ll st = L;
	for(int i = 0; i < N; i++) {
		MinMax(st, (i == N - 1) ? N - 1 : st + d - 1, &mn[i], &mx[i]);
		st += d;
	}
		
	ll ans = 0;
	for(int i = 1; i < N; i++)
		ans = max(ans, mn[i] - mx[i - 1]);
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 344 KB Execution failed because the return code was nonzero
2 Runtime error 0 ms 2388 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 2388 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
6 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
7 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
8 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
9 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
10 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
11 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
12 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
13 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
14 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
15 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
16 Runtime error 10 ms 3012 KB Execution failed because the return code was nonzero
17 Runtime error 10 ms 2980 KB Execution failed because the return code was nonzero
18 Runtime error 10 ms 2844 KB Execution failed because the return code was nonzero
19 Runtime error 10 ms 3140 KB Execution failed because the return code was nonzero
20 Runtime error 6 ms 2984 KB Execution failed because the return code was nonzero
21 Runtime error 41 ms 4400 KB Execution failed because the return code was nonzero
22 Runtime error 42 ms 4408 KB Execution failed because the return code was nonzero
23 Runtime error 40 ms 4396 KB Execution failed because the return code was nonzero
24 Runtime error 43 ms 4428 KB Execution failed because the return code was nonzero
25 Runtime error 46 ms 4312 KB Execution failed because the return code was nonzero
26 Runtime error 40 ms 4368 KB Execution failed because the return code was nonzero
27 Runtime error 41 ms 4424 KB Execution failed because the return code was nonzero
28 Runtime error 41 ms 4648 KB Execution failed because the return code was nonzero
29 Runtime error 41 ms 4400 KB Execution failed because the return code was nonzero
30 Runtime error 24 ms 4392 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
32 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
2 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
4 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
5 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
6 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
7 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
8 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
9 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
10 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
11 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
12 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
13 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
14 Runtime error 1 ms 2388 KB Execution failed because the return code was nonzero
15 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero
16 Runtime error 10 ms 3008 KB Execution failed because the return code was nonzero
17 Runtime error 12 ms 2844 KB Execution failed because the return code was nonzero
18 Runtime error 10 ms 2844 KB Execution failed because the return code was nonzero
19 Runtime error 10 ms 2844 KB Execution failed because the return code was nonzero
20 Runtime error 6 ms 2828 KB Execution failed because the return code was nonzero
21 Runtime error 44 ms 4396 KB Execution failed because the return code was nonzero
22 Runtime error 43 ms 4424 KB Execution failed because the return code was nonzero
23 Runtime error 41 ms 4428 KB Execution failed because the return code was nonzero
24 Runtime error 40 ms 4412 KB Execution failed because the return code was nonzero
25 Runtime error 39 ms 4392 KB Execution failed because the return code was nonzero
26 Runtime error 42 ms 4400 KB Execution failed because the return code was nonzero
27 Runtime error 40 ms 4400 KB Execution failed because the return code was nonzero
28 Runtime error 40 ms 4400 KB Execution failed because the return code was nonzero
29 Runtime error 43 ms 4420 KB Execution failed because the return code was nonzero
30 Runtime error 24 ms 4388 KB Execution failed because the return code was nonzero
31 Runtime error 0 ms 2392 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 2392 KB Execution failed because the return code was nonzero