func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long MAX_N = 4e3 + 10;   const long long MAX_M = 65 + 10;   const long long mod = 1e9 + 7;   const int INF = 1e9;   inline long long bpow(long long t, long long n) {     long long ans = 1;     while (n > 0) {       if (n & 1) ans = (ans * t) % mod;       t = (t * t) % mod, n >>= 1;     }     return ans;   }   int dp[MAX_N][MAX_M][MAX_M][2];   int a[MAX_N];   int cdp(int l, int r, int k, int x) {     if ((r - l + 1) < k) return 0;     if (dp[l][r - l][k][x] != -1) return dp[l][r - l][k][x];     int& ans = dp[l][r - l][k][x];     if (x == 0)       ans = max(cdp(l + k, r, k, 1) + a[l + k - 1] - a[l - 1],                 (r - l >= k) ? (a[l + k] - a[l - 1] + cdp(l + k + 1, r, k + 1, 1))                              : (-INF));     else       ans = min(a[r - k] - a[r] + cdp(l, r - k, k, 0),                 (r - l >= k) ? (a[r - k - 1] - a[r] + cdp(l, r - k - 1, k + 1, 0))                              : INF);     return ans;   }   int main() {     memset(dp, -1, sizeof dp);     ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);     cout << fixed << setprecision(0);     int n;     cin >> n;     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1; i <= n; i++) a[i] += a[i - 1];     cout << cdp(1, n, 1, 0);   }   