Submission #1172642


Source Code Expand

#!/usr/bin/ruby
n,c,k,*t=`dd`.split.map &:to_i
r=d=q=0
t.sort.each{|e|
	if e>q||d==c
		q=e+k
		d=0
		r+=1
	end
	d+=1
}
p r

Submission Info

Submission Time
Task A - Airport Bus
User leafmoon
Language Ruby (2.3.3)
Score 300
Code Size 133 Byte
Status AC
Exec Time 83 ms
Memory 10996 KB

Compile Error

./Main.rb:2: warning: `&' interpreted as argument prefix
./Main.rb:2: warning: assigned but unused variable - n

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 13 ms 2164 KB
in2.txt AC 78 ms 10876 KB
in3.txt AC 83 ms 10876 KB
in4.txt AC 79 ms 10880 KB
in5.txt AC 9 ms 2044 KB
in6.txt AC 78 ms 10996 KB
in7.txt AC 67 ms 9816 KB
in8.txt AC 78 ms 10880 KB
sample1.txt AC 8 ms 2044 KB
sample2.txt AC 8 ms 2044 KB