#include <bits/stdc++.h>
using namespace std;
const long long Inf = 2e9;
long long dp[2010], n, k, a[2010];
long long Rec(long long i, long long x) {
  if (i >= n) return 0;
  if (dp[i] != -1) return dp[i];
  long long Res = Inf;
  for (long long j = i + 1; j <= n; j++)
    if (j == n || abs(a[j] - a[i]) <= (j - i) * x)
      Res = min(Res, (j - i - 1) + Rec(j, x));
  return dp[i] = Res;
}
int main() {
  cin >> n >> k;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long Start = 0, End = Inf, Ans = Inf;
  memset(dp, -1, sizeof(dp));
  while (Start <= End) {
    memset(dp, -1, sizeof(dp));
    long long mid = (Start + End) / 2;
    long long Res = Inf;
    for (long long i = 0; i < n; i++) Res = min(Res, i + Rec(i, mid));
    if (Res <= k)
      Ans = mid, End = mid - 1;
    else
      Start = mid + 1;
  }
  cout << Ans;
  return 0;
}
