Levko and Array

题意翻译

题意:可以修改k次a,求$max|a[i]-a[i-1]|$ Translated by @Kelin

题目描述

Levko has an array that consists of integers: $ a_{1},a_{2},...\ ,a_{n} $ . But he doesn’t like this array at all. Levko thinks that the beauty of the array $ a $ directly depends on value $ c(a) $ , which can be calculated by the formula: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF360B/bc46a8f9d72cc21bf5d1738220033f31da7db825.png) The less value $ c(a) $ is, the more beautiful the array is.It’s time to change the world and Levko is going to change his array for the better. To be exact, Levko wants to change the values of at most $ k $ array elements (it is allowed to replace the values by any integers). Of course, the changes should make the array as beautiful as possible. Help Levko and calculate what minimum number $ c(a) $ he can reach.

输入输出格式

输入格式


The first line contains two integers $ n $ and $ k $ ( $ 1<=k<=n<=2000 $ ). The second line contains space-separated integers $ a_{1},a_{2},...\ ,a_{n} $ ( $ -10^{9}<=a_{i}<=10^{9} $ ).

输出格式


A single number — the minimum value of $ c(a) $ Levko can get.

输入输出样例

输入样例 #1

5 2
4 7 4 7 4

输出样例 #1

0

输入样例 #2

3 1
-100 0 100

输出样例 #2

100

输入样例 #3

6 3
1 2 3 7 8 9

输出样例 #3

1

说明

In the first sample Levko can change the second and fourth elements and get array: $ 4 $ , $ 4 $ , $ 4 $ , $ 4 $ , $ 4 $ . In the third sample he can get array: $ 1 $ , $ 2 $ , $ 3 $ , $ 4 $ , $ 5 $ , $ 6 $ .