#include <bits/stdc++.h>
using namespace std;
long long int ABS(long long int a) {
  if (a < 0) return (-a);
  return a;
}
void input() {}
long long int a[2005];
int n;
long long int K;
int dp[2005][2005];
int f(int idx, int last) {
  if (idx > n) {
    return 0;
  }
  int &res = dp[idx][last];
  if (res != -1) return res;
  res = 1 + f(idx + 1, last);
  if (last == 0 || ABS(a[idx] - a[last]) <= (idx - last) * K) {
    res = min(res, f(idx + 1, idx));
  }
  return res;
}
int main() {
  input();
  int k;
  cin >> n >> k;
  for (int i = (1); i < ((n + 1)); ++i) cin >> a[i];
  long long int lo = 0, hi = 2000000100;
  long long int ans = -1;
  while (lo <= hi) {
    long long int mid = (lo + hi) / 2;
    K = mid;
    memset(dp, -1, sizeof(dp));
    if (f(1, 0) <= k) {
      hi = mid - 1;
      ans = mid;
    } else
      lo = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
