#include <bits/stdc++.h>
using namespace std;
const long long N = 2e3 + 5;
long long n, k, a[N], dp[N], ans;
bool solve(long long x) {
  for (long long i = 1; i <= n; i++) dp[i] = 1;
  for (long long i = 2; i <= n; i++)
    for (long long j = 1; j < i; j++)
      if (x * (i - j) >= abs(a[i] - a[j])) dp[i] = max(dp[i], dp[j] + 1);
  for (long long i = 1; i <= n; i++)
    if (i - dp[i] + n - i <= k) return 1;
  return 0;
}
signed main() {
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; i++) scanf("%lld", &a[i]);
  long long l = 0, r = 2e9;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (solve(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%lld\n", ans);
  return 0;
}
