#include <bits/stdc++.h>
using namespace std;
int dp[10000];
int a[100000], n, k;
bool check(long long x) {
  for (int i = 1; i <= n; i++) {
    dp[i] = i - 1;
    if (dp[i] + (n - i) <= k) return true;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++)
      if ((long long)(i - j) * x >= abs(a[i] - a[j])) {
        dp[i] = min(dp[j] + (i - j - 1), dp[i]);
        if (dp[i] + (n - i) <= k) return true;
      }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long l = 0, r = 2e9 + 1, mid = (l + r) >> 1ll;
  while (l <= r) {
    mid = (l + r) >> 1ll;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  cout << r + 1;
}
