#include <bits/stdc++.h>
using namespace std;
long long A[2222];
long long dp[2222];
int n, k;
long long minneeded(long long reqd) {
  for (int i = n; i >= 0; i--) {
    dp[i] = 111111111;
    for (int j = i + 1; j <= n + 1; j++) {
      bool possible = true;
      long long numeles = j - i - 1;
      if (numeles > dp[i]) break;
      if (i > 0 && j < n + 1) {
        long long x = min(A[i], A[j]);
        long long y = max(A[i], A[j]);
        if (y - x > (long long)reqd * (long long)(numeles + 1))
          possible = false;
      }
      if (possible) dp[i] = min(dp[i], numeles + dp[j]);
    }
  }
  return dp[0];
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> A[i];
  long long low = 0;
  long long high = 22222222222ll;
  while (low < high) {
    int mid = (low + high) / 2;
    if (minneeded(mid) <= k) {
      high = mid;
    } else {
      low = mid + 1;
    }
  }
  cout << low << endl;
}
