Submission #4068427
Source Code Expand
n,c,k = map(int,input().split(" ")) ar = [] for i in range(n): l = int(input()) ar.append(l) ar.sort() count = 1 i = 0 t = 1 while True: if i == n-1: break else: if ar[i+1] - ar[i] <= k and t < c: t += 1 i += 1 else: count += 1 i += 1 t = 1 print(count)
Submission Info
Submission Time | |
---|---|
Task | A - Airport Bus |
User | beetiruka |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 380 Byte |
Status | WA |
Exec Time | 273 ms |
Memory | 7384 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | 20 ms | 3064 KB |
in2.txt | AC | 260 ms | 7384 KB |
in3.txt | WA | 261 ms | 7376 KB |
in4.txt | AC | 254 ms | 7380 KB |
in5.txt | WA | 22 ms | 3064 KB |
in6.txt | WA | 273 ms | 7384 KB |
in7.txt | WA | 230 ms | 6888 KB |
in8.txt | WA | 260 ms | 7384 KB |
sample1.txt | AC | 17 ms | 3064 KB |
sample2.txt | AC | 17 ms | 3060 KB |