Submission #1162884
Source Code Expand
n,c,k,*a=$<.read.split.map &:to_i b=[[a.sort![0]]] 1.upto(n-1){|i|g=b[-1];g.size<c&&g[0]+k>=a[i] ?g<< i:b<< [a[i]]} p b.size
Submission Info
Submission Time | |
---|---|
Task | A - Airport Bus |
User | miraxial |
Language | Ruby (2.3.3) |
Score | 300 |
Code Size | 127 Byte |
Status | AC |
Exec Time | 87 ms |
Memory | 14336 KB |
Compile Error
./Main.rb:1: warning: `&' interpreted as argument prefix
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 7 ms | 1788 KB |
in2.txt | AC | 78 ms | 10728 KB |
in3.txt | AC | 87 ms | 14336 KB |
in4.txt | AC | 83 ms | 14312 KB |
in5.txt | AC | 8 ms | 1788 KB |
in6.txt | AC | 81 ms | 12776 KB |
in7.txt | AC | 71 ms | 10316 KB |
in8.txt | AC | 81 ms | 11240 KB |
sample1.txt | AC | 7 ms | 1788 KB |
sample2.txt | AC | 7 ms | 1788 KB |