#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int N = 2e3 + 5;
int n, k, arr[N], dp[N][N], mid;
int solve(int i = 0, int last = n) {
  if (i == n) return 0;
  int &ret = dp[i][last];
  if (~ret) return ret;
  ret = 1 + solve(i + 1, last);
  if (last == n || 1ll * (i - last) * mid >= abs(arr[i] - arr[last]))
    ret = min(ret, solve(i + 1, i));
  return ret;
}
bool ok() {
  memset(dp, -1, sizeof dp);
  return solve() <= k;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", arr + i);
  int st = 0, en = 2e9 + 5;
  while (st < en) {
    mid = st + (en - st) / 2;
    if (ok())
      en = mid;
    else
      st = mid + 1;
  }
  printf("%d", st);
  return 0;
}
