#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:600000000")
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
double const pi = 3.1415926535897932384626433832795;
int const inf = (int)2e9 + 1;
long long const inf64 = (long long)4e18;
const string name = "b";
const int NMAX = 2014;
int n, k, a[NMAX];
int d[NMAX][NMAX];
int may(long long lvl) {
  for (int i = 0; i < (int)n + 1; i++)
    for (int j = 0; j < (int)i + 1; j++) d[i][j] = k + 1;
  d[0][0] = 0;
  for (int i = 0; i < (int)n; i++)
    for (int j = 0; j < (int)i + 1; j++)
      if (d[i][j] <= k) {
        d[i + 1][j + 1] = min(d[i + 1][j + 1], d[i][j] + 1);
        if (i == j || abs(a[i] - a[i - j - 1]) <= lvl * (j + 1))
          d[i + 1][0] = min(d[i + 1][0], d[i][j]);
      }
  for (int i = 0; i < (int)n + 1; i++)
    if (d[n][i] <= k) return true;
  return false;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < (int)n; i++) scanf("%d", &a[i]);
  long long l = 0, r = inf;
  while (r - l > 0) {
    long long m = ((l + r) / 2);
    if (may(m))
      r = m;
    else
      l = m + 1;
  }
  cout << l << endl;
  return 0;
}
