#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e3 + 5;
int n, k;
long long a[MAX], dp[MAX];
inline int read();
bool judge(long long);
int main() {
  n = read();
  k = read();
  for (register int i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  long long l = 0, r = 2000000000;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (judge(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%I64d\n", l);
  return 0;
}
inline int read() {
  char tmp = getchar();
  int sum = 0;
  bool flag = false;
  while (tmp < '0' || tmp > '9') {
    if (tmp == '-') flag = true;
    tmp = getchar();
  }
  while (tmp >= '0' && tmp <= '9') {
    sum = (sum << 1) + (sum << 3) + tmp - '0';
    tmp = getchar();
  }
  return flag ? -sum : sum;
}
bool judge(long long mid) {
  for (register int i = 1; i <= n; ++i) {
    dp[i] = i - 1;
    for (register int j = 1; j <= i - 1; ++j)
      if (abs(a[i] - a[j]) <= (i - j) * mid) {
        dp[i] = min(dp[i], dp[j] + i - j - 1);
      }
  }
  for (register int i = 1; i <= n; ++i)
    if (dp[i] + n - i <= k) return true;
  return false;
}
