답안 #402312

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
402312 2021-05-11T14:57:27 Z rainboy 쌀 창고 (IOI11_ricehub) C
100 / 100
19 ms 1736 KB
#include "ricehub.h"

int max(int a, int b) { return a > b ? a : b; }

int besthub(int n, int L, int *xx, long long d) {
	int i, j, k;

	k = 0;
	for (i = 0, j = 0; j < n; j++) {
		d -= xx[j] - xx[(i + j) / 2];
		while (d < 0)
			d += xx[(i + 1 + j) / 2] - xx[i], i++;
		k = max(k, j - i + 1);
	}
	return k;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 292 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 292 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 292 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 288 KB Output is correct
21 Correct 1 ms 292 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 1 ms 204 KB Output is correct
26 Correct 1 ms 204 KB Output is correct
27 Correct 1 ms 204 KB Output is correct
28 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 292 KB Output is correct
3 Correct 1 ms 288 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 292 KB Output is correct
16 Correct 1 ms 292 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 292 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 2 ms 332 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 460 KB Output is correct
2 Correct 3 ms 460 KB Output is correct
3 Correct 15 ms 1712 KB Output is correct
4 Correct 15 ms 1696 KB Output is correct
5 Correct 6 ms 792 KB Output is correct
6 Correct 6 ms 716 KB Output is correct
7 Correct 15 ms 1356 KB Output is correct
8 Correct 13 ms 1356 KB Output is correct
9 Correct 6 ms 684 KB Output is correct
10 Correct 6 ms 716 KB Output is correct
11 Correct 15 ms 1688 KB Output is correct
12 Correct 15 ms 1736 KB Output is correct
13 Correct 8 ms 940 KB Output is correct
14 Correct 10 ms 836 KB Output is correct
15 Correct 15 ms 1348 KB Output is correct
16 Correct 11 ms 1356 KB Output is correct
17 Correct 19 ms 1556 KB Output is correct
18 Correct 13 ms 1552 KB Output is correct
19 Correct 14 ms 1612 KB Output is correct
20 Correct 14 ms 1564 KB Output is correct