#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e3 + 5;
long long int a[MAXN];
long long int dp[MAXN];
long long int n, k;
bool check(long long int x) {
  memset(dp, 63, sizeof dp);
  dp[0] = 0;
  for (int i = 1; i < n; i++) {
    dp[i] = i;
    for (int j = 0; j < i; j++) {
      if ((i - j) * x >= abs(a[i] - a[j])) {
        dp[i] = min(dp[i], dp[j] + (i - j - 1));
      }
    }
  }
  long long int mmin = 2e9 + 7;
  for (int i = 0; i < n; i++) {
    mmin = min(mmin, dp[i] + n - i - 1);
  }
  if (mmin <= k) {
    return 1;
  }
  return 0;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n <= 1) {
    cout << 0;
    return 0;
  }
  long long int r = 2e9 + 7;
  long long int l = -1;
  while (r - l > 1) {
    long long int mid = (r + l) / 2;
    if (check(mid)) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << r;
}
