#include <bits/stdc++.h>
using namespace std;
int N, K, ans = 2e9;
int A[2002], D[2002];
bool proc(long long m) {
  int i, j, ret = 1;
  for (i = 1; i <= N; i++) D[i] = 1;
  for (i = 1; i <= N; i++)
    if (i - D[i] <= K) {
      if (D[i] >= N - K) return 1;
      for (j = i + 1; j <= N && j <= K + D[i] + 1; j++)
        if (D[j] <= D[i] && abs(A[i] - A[j]) <= (j - i) * m) {
          D[j] = D[i] + 1;
        }
    }
  return 0;
}
int main() {
  int i, j, k;
  long long s, e, m;
  scanf("%d%d", &N, &K);
  for (i = 1; i <= N; i++) scanf("%d", A + i);
  if (N == 1 || N - K <= 1) {
    puts("0");
    return 0;
  }
  s = 0, e = 2e9;
  while (s <= e) {
    m = (s + e) >> 1;
    if (proc(m))
      e = m - 1, ans = m;
    else
      s = m + 1;
  }
  printf("%d\n", ans);
}
