#include <bits/stdc++.h>
using namespace std;
int n, k;
long long a[2008];
long long maxd;
int dp[2008];
long long myabs(long long a) { return a >= 0 ? a : -a; }
int go(int from) {
  if (from == n - 1) return 0;
  if (dp[from] != -1) return dp[from];
  int ret = n - from - 1;
  for (int i = from + 1; i < n; i++) {
    long long diff = myabs(a[i] - a[from]);
    if ((i - from) * maxd >= diff) {
      int cost = i - from - 1;
      int add = go(i);
      int tot = cost + add;
      if (tot < ret) ret = tot;
    }
  }
  return dp[from] = ret;
}
int get(long long maxdiff) {
  maxd = maxdiff;
  memset((dp), (-1), sizeof((dp)));
  int ret = 10000;
  for (int i = 0; i < n; i++) {
    int val = i + go(i);
    ret = min(ret, val);
  }
  return min(ret, n - 1);
}
void solution() {
  cin >> n >> k;
  for (int i = 0, _n = (n); i < _n; ++i) cin >> a[i];
  long long lo = 0, hi = 2000000008;
  while (hi - lo > 1) {
    long long mid = (lo + hi) / 2;
    int need = get(mid);
    if (need <= k)
      hi = mid;
    else
      lo = mid + 1;
  }
  if (lo < hi && get(lo) <= k) hi = lo;
  cout << hi << endl;
}
int main() {
  solution();
  return 0;
}
