#include <bits/stdc++.h>
using namespace std;
long long n, k, a[2001], i, j, l, r, mid;
bool f(long long x) {
  long long ans = 0, dp[2001] = {0};
  for (i = 1; i <= n; i++) {
    dp[i] = 1;
    for (j = 1; j < i; j++)
      if (x * (i - j) >= abs(a[i] - a[j])) dp[i] = max(dp[i], dp[j] + 1);
    ans = max(ans, dp[i]);
  };
  return (ans >= n - k);
};
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i];
  l = 0;
  r = 2 * 1000000000;
  while (l < r) {
    mid = (l + r) / 2;
    if (!f(mid))
      l = mid + 1;
    else
      r = mid;
  };
  cout << l << endl;
  return 0;
}
