P2909 [USACO08OPEN] Cow Cars S
Description
N (1
Input Format
\* Line 1: Four space-separated integers: N, M, D, and L
\* Lines 2..N+1: Line i+1 describes cow i's initial speed with a single integer: S\_i
Output Format
\* Line 1: A single integer representing the maximum number of cows that can use the highway
Explanation/Hint
There are three cows with one lane to drive on, a speed decrease of 1, and a minimum speed limit of 5.
Two cows are possible, by putting either cow with speed 5 first and the cow with speed 7 second.