func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<long long> a;   vector<long long> dp(2001);   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL), cout.tie(NULL);     int t = 1;     long long n, k, x, temp;     2000000001LL;     while (t--) {       cin >> n >> k;       for (int i = 0; i < n; i++) {         cin >> x, a.push_back(x);       }       long long left = 0, right = 2000000000LL;       long long required = 2000000001LL;       while (left < right) {         x = (left + right) / 2LL;         required = 2000000001LL;         for (int i = 0; i < n; i++) {           dp[i] = i;           for (int j = 0; j < i; j++) {             temp = (abs(a[i] - a[j]) + i - j - 1) / (i - j);             if (temp <= x) dp[i] = min(dp[i], dp[j] + i - j - 1);           }           required = min(required, dp[i] + n - i - 1);         }         if (required > k)           left = x + 1;         else           right = x;       }       cout << left << endl;     }     return 0;   }   