#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
long long dp[N], a[N];
int n, k, ans;
bool check(long long x) {
  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) * x) {
        dp[i] = min(dp[i], dp[j] + (i - j - 1));
      }
    }
    if (dp[i] + n - i <= k) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &k);
  long long L = 0, R = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i != 1) R = max((long long)R, abs(a[i] - a[i - 1]));
  }
  while (L <= R) {
    long long mid = (L + R) >> 1;
    if (check(mid)) {
      ans = mid;
      R = mid - 1;
    } else
      L = mid + 1;
  }
  cout << ans;
}
