#include <bits/stdc++.h>
using namespace std;
const long long mxn = 1e6 + 2;
const long long inf = 1e9 + 7;
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long n, a[mxn], k, dp[mxn], l = 0, r = inf * 2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  bool ok = false;
  long long mid;
  while (l < r) {
    mid = (l + r) >> 1;
    ok = false;
    for (int i = 1; i <= n; i++) {
      dp[i] = i - 1;
      for (int j = i - 1; j; j--) {
        if (abs(a[i] - a[j]) <= (i - j) * mid)
          dp[i] = min(dp[i], dp[j] + (i - j - 1));
      }
      if (dp[i] + n - i <= k) ok = true;
    }
    if (ok)
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << endl;
  return 0;
}
