#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[2010], dp[2010];
bool kiemtra(long long val) {
  int i, j;
  for (i = 0; i < n; i++) dp[i] = i;
  for (i = 0; i < n; i++)
    for (j = 0; j < i; j++)
      if (1LL * abs(a[i] - a[j]) <= 1LL * (i - j) * val)
        dp[i] = min(dp[i], dp[j] + (i - j - 1));
  for (i = 0; i < n; i++)
    if (dp[i] + n - i - 1 <= k) return true;
  return false;
}
void solve() {
  int i;
  long long dau, cuoi, giua, ans;
  dau = 0;
  cuoi = 1e10;
  ans = 0;
  while (dau <= cuoi) {
    giua = (dau + cuoi) >> 1;
    if (kiemtra(giua)) {
      ans = giua;
      cuoi = giua - 1;
    } else
      dau = giua + 1;
  }
  cout << ans << endl;
}
void input() {
  int i;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  solve();
}
int main() {
  input();
  fclose(stdin);
  fclose(stdout);
  return 0;
}
