#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T pow(T a, T b, long long m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = ((ans % m) * (a % m)) % m;
    b /= 2;
    a = ((a % m) * (a % m)) % m;
  }
  return ans % m;
}
long long mid;
long long dp[2005][2005];
long long a[2005];
int n;
long long k;
long long solve(int id, int prev) {
  if (id == n + 1) return 0;
  if (dp[id][prev] != -1) return dp[id][prev];
  long long ans = (long long)1e18 + 5LL;
  if (prev == 0)
    ans = min(1 + solve(id + 1, prev), solve(id + 1, id));
  else {
    ans = 1 + solve(id + 1, prev);
    if (abs(a[id] - a[prev]) <= (id - prev) * mid)
      ans = min(ans, solve(id + 1, id));
  }
  return dp[id][prev] = ans;
}
long long binary_search(long long lo, long long hi) {
  long long ans;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    memset(dp, -1, sizeof dp);
    if (solve(1, 0) <= k) {
      ans = mid;
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cout << binary_search(0, (long long)2e9);
}
