#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
int n, a[N], k, dp[N];
void bsearch() {
  long long l = -1, r = 2e9 + 1;
  while (l + 1 < r) {
    long long mid = (r + l) / 2;
    bool check = false;
    for (int i = 0; i < n; i++) {
      dp[i] = i;
      for (int j = 0; j < i; j++) {
        if (abs(a[i] - a[j]) > (i - j) * mid) continue;
        dp[i] = min(dp[i], dp[j] + i - j - 1);
      }
      if (dp[i] + n - i - 1 <= k) {
        check = true;
        break;
      }
    }
    if (check) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << r << endl;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bsearch();
}
