#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 3;
const long long MOD = 1e9 + 7;
const long long INF = 2e9 + 5;
long long a[2003];
bool check(long long x, int n, int k) {
  int op = 0;
  vector<long long> dp(n + 2, INF);
  dp[0] = 0;
  for (long long i = 1; i <= n; i++) {
    for (long long j = i - 1; j >= 0; j--) {
      if (j == 0 or abs(a[j] - a[i]) <= x * (i - j)) {
        dp[i] = min(dp[i], dp[j] + i - j - 1);
      }
    }
  }
  for (int i = 0; i <= n; i++) {
    dp[n + 1] = min(dp[n + 1], dp[i] + n - i);
  }
  return (dp[n + 1] <= k);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long lo = 0, hi = 2e9;
  while (hi > lo) {
    long long mid = (lo + hi) / 2;
    if (check(mid, n, k))
      hi = mid;
    else
      lo = mid + 1;
  }
  cout << lo;
}
