Submission #1498141


Source Code Expand

n,c,k=map(int,input().split())
t=sorted([int(input()) for i in range(n)])
st,p,ans=-k,0,0
for i in t:
	if st+k<i or p==c:
		ans+=1
		p=1
		st=i
	else:
		p+=1
print(ans)

Submission Info

Submission Time
Task A - Airport Bus
User fts2001
Language PyPy3 (2.4.0)
Score 300
Code Size 178 Byte
Status AC
Exec Time 513 ms
Memory 52952 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 12
Set Name Test Cases
Sample sample1.txt, sample2.txt
All 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 AC 243 ms 43120 KB
in2.txt AC 513 ms 52952 KB
in3.txt AC 492 ms 51032 KB
in4.txt AC 511 ms 51160 KB
in5.txt AC 221 ms 41968 KB
in6.txt AC 496 ms 51160 KB
in7.txt AC 460 ms 50008 KB
in8.txt AC 493 ms 51032 KB
sample1.txt AC 158 ms 38256 KB
sample2.txt AC 159 ms 38256 KB