#include <bits/stdc++.h>
using namespace std;
int n, k;
long long a[3003], f[3003];
bool ck(long long x) {
  for (int i = 1; i <= n; i++) {
    f[i] = i - 1;
    for (int j = 1; j <= i - 1; j++)
      if (abs(a[i] - a[j]) <= 1ll * (i - j) * x)
        f[i] = min(f[i], f[j] + i - j - 1);
    if (f[i] + n - i <= k) return 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long l = 0, r = 2e9 + 1;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (ck(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  cout << l;
  return 0;
}
