func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve(const int &test_id) {     int n, p, k;     cin >> n >> p >> k;     vector<pair<long long, int> > aud(n);     for (int i = 0; i < n; i++) cin >> aud[i].first, aud[i].second = i;     sort(aud.rbegin(), aud.rend());     vector<int> twos(p + 1);     for (int i = 0; i < p + 1; i++) twos[i] = (1 << i);     vector<vector<long long> > skill(n, vector<long long>(twos[p]));     for (int i = 0; i < n; i++)       for (int j = 0; j < p; j++) cin >> skill[i][j];     vector<vector<long long> > dp(n + 1, vector<long long>(twos[p]));     for (int i = 1; i < n + 1; i++) {       for (int j = 0; j < twos[p]; j++) {         int curr_aud_count = i - 1 - __builtin_popcount(j);         if (curr_aud_count < k && curr_aud_count > -1)           dp[i][j] = max(dp[i][j], dp[i - 1][j] + aud[i - 1].first);         else           dp[i][j] = max(dp[i][j], dp[i - 1][j]);         for (int k = 0; k < p; k++)           if (j & twos[k])             dp[i][j] = max(dp[i][j],                            dp[i - 1][j ^ twos[k]] + skill[aud[i - 1].second][k]);       }     }     cout << dp[n][twos[p] - 1] << endl;   }   void solve_cases() {     int test_cases = 1;     for (int i = 1; i <= test_cases; i++) solve(i);   }   void fast_io() {     ios::sync_with_stdio(false);     srand(time(NULL));     cin.tie(0);     cout.tie(0);     cout << fixed << setprecision(15);     cerr << fixed << setprecision(15);   }   int main() {     fast_io();     solve_cases();     return EXIT_SUCCESS;   }   