# [Usaco2006 Mar]Ski Lift 缆车支柱

### 题目描述

Farmer Ron in Colorado is building a ski resort for his cows (though budget constraints dictate construction of just one ski lift). The lift will be constructed as a monorail and will connect a concrete support at the starting location to the support at the ending location via some number of intermediate supports, each of height 0 above its land. A straight-line segment of steel connects every pair of adjacent supports. For obvious reasons, each section of straight steel must lie above the ground at all points. Always frugal, FR wants to minimize the number of supports that he must build. He has surveyed the N (2 <= N <= 5,000) equal-sized plots of land the lift will traverse and recorded the integral height H (0 <= H <= 1,000,000,000) of each plot. Safety regulations require FR to build adjacent supports no more than K (1 <= K <= N - 1) units apart. The steel between each pair of supports is rigid and forms a straight line from one support to the next. Help FR compute the smallest number of supports required such that: each segment of steel lies entirely above (or just tangent to) each piece of ground, no two consecutive supports are more than K units apart horizontally, and a support resides both on the first plot of land and on the last plot of land.

### 输入格式

* Line 1: Two space-separate integers, N and K

* Lines 2..N+1: Line i+1 contains a single integer that is the height of plot i.

1行：两个整数NK，用空格隔开．

2N+1行：每行包括一个正整数，第i+l行的数描述了第i个点的高度．

### 输出格式

* Line 1: A single integer equal to the fewest number of lift towers FR needs to build subject to the above constraints

输出一个整数，即罗恩最少需要修建的柱子的数目．

```13 4
0
1
0
2
4
6
8
6
8
8
9
11
12```

```5
```

### 提示

样例说明

罗恩最少要修建5根柱子（分别在第157913个山坡上的点）．钢丝在1-55-77-9以及12 - 134段上与地面相切．

Gold