#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const double pi = 3.14159265358979323846;
int n, k;
int a[10000];
bool read() {
  if (!(cin >> n >> k)) return false;
  for (int i = 0; i < int(n); ++i) cin >> a[i];
  return true;
}
int dp[2010];
bool ok(long long t) {
  for (int i = 0; i < int(n); ++i) dp[i] = i;
  for (int i = 0; i < int(n); ++i)
    for (int j = i + 1; j < n; ++j) {
      if (abs(a[i] - a[j]) <= (j - i) * t)
        dp[j] = min(dp[j], dp[i] + j - i - 1);
    }
  for (int i = 0; i < int(n); ++i)
    if (n - i - 1 + dp[i] <= k) return true;
  return false;
}
void solve() {
  long long l = -1, r = 2e9;
  while (r - l > 1) {
    int m = (r + l) / 2;
    if (ok(m))
      r = m;
    else
      l = m;
  }
  cout << r << endl;
}
int main() {
  while (read()) solve();
  return 0;
}
