#2956. [Usaco2008 Open]Cow Cars 奶牛飞车
[Usaco2008 Open]Cow Cars 奶牛飞车
Description
编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车道.奶牛i有一个自己的车速上限Si(l≤Si≤1,000,000).
Format
Input
第1行输入N,M,D,L四个整数,之后N行每行一个整数输入Si.
N<=50000
Output
输出最多有多少奶牛可以在高速公路上行驶.
Samples
Limitation
INPUT DETAILS:
There are three cows with one lane to drive on, a speed decrease of 1, and a minimum speed limit of 5.
OUTPUT DETAILS:
Two cows are possible, by putting either cow with speed 5 first and the cow with speed 7 second.