#include <bits/stdc++.h>
using namespace std;
const int MN = 2010;
int N, K, A[MN], F[MN];
bool Check(long long m) {
  if (m < 0) return 0;
  F[1] = 0;
  for (int i = 2; i <= N; i++) {
    F[i] = (100000);
    for (int j = 1; j < i; j++)
      if (((A[i] - A[j]) >= 0 ? (A[i] - A[j]) : (-(A[i] - A[j]))) <=
          m * (i - j))
        ((F[i]) > (F[j] + i - j - 1) ? (F[i]) = (F[j] + i - j - 1) : 1);
    if (i - 1 <= K) ((F[i]) > (i - 1) ? (F[i]) = (i - 1) : 1);
  }
  for (int i = 1; i <= N; i++)
    if (F[i] + N - i <= K) return 1;
  return 0;
}
inline void Main() {
  scanf("%d%d", &N, &K);
  for (int i = 1; i <= N; i++) scanf("%d", A + i);
  long long l = 0 - 1, r = 2000000000;
  while (l < r) {
    int m = (l + r + 1) >> 1;
    if (Check(m))
      r = m - 1;
    else
      l = m;
  }
  printf(
      "%lld"
      "\n",
      l + 1);
}
int main() {
  Main();
  return 0;
}
