#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 3;
const int maxm = 1e6 + 3;
const int mod = 1e9 + 7;
const long long oo = 2e9 + 5;
const long double pi = 3.141592653589793238462643383279502884;
void input() {
  if (fopen("abc"
            ".inp",
            "r")) {
    freopen(
        "abc"
        ".inp",
        "r", stdin);
    freopen(
        "abc"
        ".out",
        "w", stdout);
  }
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int n, k;
long long a[maxn], dp[maxn];
bool ok(long long x) {
  for (int i = 1; i <= n; ++i) {
    dp[i] = i - 1;
    for (int j = i - 1; j > 0; --j)
      if (abs(a[i] - a[j]) <= x * (i - j))
        dp[i] = min(dp[i], dp[j] + i - j - 1);
  }
  for (int i = 1; i < n; ++i) dp[n] = min(dp[n], dp[i] + n - i);
  return dp[n] <= k;
}
int main() {
  input();
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  long long l = 0, r = oo;
  long long ans = r;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (ok(mid)) {
      ans = min(ans, mid);
      r = mid - 1;
    } else
      l = mid + 1;
  }
  cout << ans;
  return 0;
}
