func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 2e5 + 100;   int arr[maxn];   int cum[maxn], n, m, k;   int dp[2020];   map<int, int> offer;   int range(int l, int r) { return (cum[r] - cum[l]); }   int solve(int i) {     if (i == k) return 0;     int &ret = dp[i];     if (ret != -1) return ret;     ret = 1e9;     for (int j = i + 1; j <= k; j++) {       int buy = (j - i);       int of = offer[buy];       int taka = range(i, j);       int offtaka = range(i, i + of);       ret = min(ret, taka - offtaka + solve(j));     }     return ret;   }   int main() {     scanf( %d%d%d , &n, &m, &k);     memset(dp, -1, sizeof dp);     for (int i = 1; i <= n; i++) scanf( %d , &arr[i]);     sort(arr + 1, arr + n + 1);     for (int i = 1; i <= m; i++) {       int xi, yi;       scanf( %d%d , &xi, &yi);       offer[xi] = max(offer[xi], yi);     }     for (int i = 1; i <= k; i++) cum[i] = cum[i - 1] + arr[i];     cout << solve(0) << endl;     return 0;   }   