Submission #1156545


Source Code Expand

Copy
N, C, K = map(int, input().split())
c = C
T = 0
ans = 0
t = []
for i in range(N):
	t.append(int(input()))
t.sort()
for i in t:
	if i <= T  and c > 0:
		c -= 1
	else:
		T = i + K
		c = C - 1
		ans += 1
print(ans)

Submission Info

Submission Time
Task A - Airport Bus
User TAB
Language Python3 (3.4.3)
Score 300
Code Size 226 Byte
Status
Exec Time 241 ms
Memory 7384 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt
All 300 / 300 sample1.txt, sample2.txt, in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, sample1.txt, sample2.txt
Case Name Status Exec Time Memory
in1.txt 21 ms 3316 KB
in2.txt 227 ms 7384 KB
in3.txt 240 ms 7380 KB
in4.txt 241 ms 7380 KB
in5.txt 20 ms 3060 KB
in6.txt 234 ms 7384 KB
in7.txt 205 ms 6896 KB
in8.txt 235 ms 7384 KB
sample1.txt 17 ms 3064 KB
sample2.txt 17 ms 2940 KB