#include <bits/stdc++.h>
using namespace std;
int n, k;
long long a[2005], dp[2005];
bool check(long long mid) {
  for (int i = 1; i <= n; i++) {
    dp[i] = i - 1;
    for (int j = 1; j < i; 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) return 1;
  }
  return 0;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long l = 0, r = 2e9, ans;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1, ans = mid;
    else
      l = mid + 1;
  }
  printf("%lld", ans);
  return 0;
}
