#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void mine(T1 &x, T2 y) {
  if (x > y) x = y;
}
template <typename T1, typename T2>
inline void maxe(T1 &x, T2 y) {
  if (x < y) x = y;
}
ostream &operator<<(ostream &a, const vector<long long> &b) {
  for (auto k : b) cout << k << ' ';
  return a;
}
const long long MOD = 1000000007;
const long long INF = 1000000050;
const long long BIG = (long long)2e18 + 50;
const long long MX = 200010;
const double EPS = 1e-9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long l = -1;
  long long r = 2 * INF;
  while (r - l > 1) {
    long long m = (r + l) >> 1;
    vector<long long> dp(n, INF);
    dp[0] = 0;
    for (long long i = 0; i < n - 1; i++) {
      mine(dp[i], max(0ll, i));
      for (long long j = i + 1; j < n; j++) {
        if ((j - i) * m >= abs(a[j] - a[i])) mine(dp[j], dp[i] + j - i - 1);
      }
      mine(dp[n - 1], dp[i] + n - i - 1);
    }
    if (dp[n - 1] <= k)
      r = m;
    else
      l = m;
  }
  cout << r << '\n';
}
