#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const int inf = 1e8;
int dp[N], n, k, a[N];
bool isok(int x) {
  dp[1] = 0;
  for (int i = 2; i <= n; i++) {
    dp[i] = i - 1;
    for (int j = i - 1; j >= 1; j--) {
      if (abs(a[j] - a[i]) <= 1ll * x * (i - j)) {
        dp[i] = min(dp[i], dp[j] + i - j - 1);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (dp[i] + n - i <= k) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int l = 0, r = 2e9 + 5;
  while (l < r) {
    int mid = ((long long)l + (long long)r) / 2;
    if (isok(mid))
      r = mid;
    else
      l = mid + 1;
  }
  printf("%d\n", l);
  return 0;
}
