#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const long long MAX_N = 2005;
long long n, k;
long long A[MAX_N];
long long dp[MAX_N];
bool check(long long c) {
  for (long long i = 1; i <= n; i++) {
    dp[i] = i - 1;
    for (long long j = 1; j < i; j++) {
      if (abs(A[i] - A[j]) <= (i - j) * c) {
        dp[i] = min(dp[i], dp[j] + i - j - 1);
      }
    }
    if (dp[i] + (n - i) <= k) return false;
  }
  return true;
}
signed main() {
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) cin >> A[i];
  long long lb = 0, ub = 2e9;
  while (lb < ub) {
    long long mid = (lb + ub) / 2;
    if (check(mid))
      lb = mid + 1;
    else
      ub = mid;
  }
  cout << lb << endl;
  return 0;
}
