#include <bits/stdc++.h>
using namespace std;
const long long MAXn = 1e5 + 100;
const long long INF = 1e9 + 100;
long long l, r = -INF, n, k, a[MAXn], p, ans, dp[MAXn], anss;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  cin >> a[1];
  for (long long i = 2; i < n + 1; ++i) {
    cin >> a[i];
    r = max(r, abs(a[i] - a[i - 1]));
  }
  while (l <= r) {
    long long p = (l + r) / 2;
    long long ans = -1;
    for (long long i = 1; i <= n; ++i) {
      dp[i] = 1;
      for (long long j = 1; j <= i - 1; ++j) {
        if (abs(a[i] - a[j]) <= p * abs(i - j)) {
          dp[i] = max(dp[i], dp[j] + 1);
        }
      }
      ans = max(ans, dp[i]);
    }
    if (ans < n - k)
      l = p + 1;
    else
      r = p - 1, anss = p;
  }
  return cout << anss << endl, 0;
}
