func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, k;   int p[2010] = {0};   int cnt = 0;   int sum[2010];   int dp[2010];   int a[200010];   int main() {     scanf( %d%d%d , &n, &m, &k);     for (int i = 1; i <= n; ++i) scanf( %d , &a[i]);     sort(a + 1, a + n + 1);     n = min(n, k);     for (int i = 1, x, y; i <= m; ++i) {       scanf( %d%d , &x, &y);       if (x > k) continue;       p[x] = max(p[x], y);     }     sum[0] = 0;     for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + a[i];     memset(dp, 0x3f3f3f3f, sizeof dp);     dp[0] = 0;     for (int i = 1; i <= k; ++i) {       for (int j = 0; j < i; ++j) {         dp[i] = min(dp[i], dp[j] + sum[i] - sum[j + p[i - j]]);       }     }     printf( %d n , dp[k]);     return 0;   }   