#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long dp[2005], n, k;
long long a[2005], inf = 2e9 + 7;
long long f(long long a) { return a > 0 ? a : -a; }
bool judge(long long mid) {
  for (int i = 1; i <= n; ++i) {
    dp[i] = i - 1;
  }
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j < i; ++j) {
      if (f(a[i] - a[j]) <= (i - j) * mid) {
        dp[i] = min(dp[i], dp[j] + (i - j - 1));
      }
    }
  }
  long long ans = n - 1;
  for (int i = 1; i <= n; ++i) {
    ans = min(ans, dp[i] + (n - i));
  }
  return k >= ans;
}
int main() {
  scanf("%lld %lld", &n, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &a[i]);
  }
  long long l = 0, r = inf;
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (judge(mid)) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  printf("%lld\n", l);
  return 0;
}
