func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 151, maxs = 150 * 150 / 4 + 5, inf = 1e9;   vector<vector<int> > d[maxs];   int a[maxn];   int n, k, s;   int main() {     scanf( %d%d%d , &n, &k, &s);     for (int i = 0; i < n; ++i) {       scanf( %d , &a[i]);     }     if (s >= maxs - 2) {       sort(a, a + n);       int sum = 0;       for (int i = 0; i < k; ++i) {         sum += a[i];       }       printf( %d , sum);       return 0;     } else {       for (int g = 0; g <= s; ++g) {         d[g].resize(n - k + 2);         for (int j = 0; j < n - k + 2; ++j) {           d[g][j].resize(k + 1, inf);         }       }       d[s][0][k] = 0;       for (int i = k; i >= 0; --i) {         for (int j = k; j <= n; ++j) {           for (int g = s; g >= 0; --g) {             int j1 = j - k;             if (i > 0)               d[g][j1][i - 1] = min(d[g][j1][i - 1], d[g][j1][i] + a[i - 1]);             if (j < n) d[g][j1 + 1][i] = min(d[g][j1 + 1][i], d[g][j1][i]);             int st = j - i + 1;             if (i > 0 && j < n && g - st >= 0) {               d[g - st][j1 + 1][i - 1] =                   min(d[g - st][j1 + 1][i - 1], d[g][j1][i] + a[j]);             }             if (i > 0 && j < n) {               d[g][j1 + 1][i - 1] =                   min(d[g][j1 + 1][i - 1], d[g][j1][i] + a[i - 1]);             }           }         }       }       int ans = inf;       for (int g = 0; g <= s; ++g) {         ans = min(d[g][n - k][0], ans);       }       printf( %d , ans);     }   }   