#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 100;
long long arr[N], dp[N];
int n, k;
bool check(long long mid) {
  for (int i = 1; i <= n; i++) {
    dp[i] = i - 1;
    for (int j = 1; j < i; j++) {
      if (abs(arr[i] - arr[j]) <= (i - j) * mid)
        dp[i] = min(dp[i], dp[j] + (i - j - 1));
    }
    if (dp[i] + n - i <= k) return true;
  }
  return false;
}
int main() {
  scanf("%d%d", &n, &k);
  long long L = 0, R = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &arr[i]);
    if (i != 1) R = max(R, abs(arr[i] - arr[i - 1]));
  }
  while (L + 1 <= R) {
    long long mid = (L + R) >> 1;
    if (check(mid))
      R = mid;
    else
      L = mid + 1;
  }
  printf("%I64d\n", R);
  return 0;
}
