func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 2002;   int n, k;   long long a[MAXN];   int dp[MAXN];   int abs1(int a) { return a >= 0 ? a : -a; }   int min1(int a, int b) { return a > b ? b : a; }   bool find(long long mid) {     for (int i = 1; i <= n + 1; i++) dp[i] = i - 1;     dp[1] = 0;     for (int i = 2; i <= n; i++)       for (int j = 1; j < i; j++)         if (abs1(a[i] - a[j]) <= (i - j) * mid)           dp[i] = min1(dp[i], dp[j] + (i - j - 1));     for (int i = 1; i <= n; i++) dp[n + 1] = min1(dp[n + 1], n - i + dp[i]);     if (dp[n + 1] <= k) return true;     return false;   }   int main() {     int i;     long long mid, L, R;     scanf( %d %d , &n, &k);     for (int i = 1; i <= n; i++) scanf( %lld , &a[i]);     L = 0;     R = 2000000001;     while (L <= R) {       mid = (L + R) >> 1;       if (find(mid))         R = mid - 1;       else         L = mid + 1;     }     printf( %lld n , R + 1);     return 0;   }   