func_code_string: #include <bits/stdc++.h>   using namespace std;   int mp[510][510], uss[510][510] = {0}, n, m, siz[510] = {0}, gnu[510][510], p,                     f[510] = {0};   int main() {     int ans = 0;     cin >> n >> m >> p;     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         scanf( %1d , &mp[i][j]);         if (mp[i][j] == 1) {           gnu[i][siz[i]] = j;           siz[i]++;         }       }       if (siz[i] == 0)         continue;       else         ans = ans + gnu[i][siz[i] - 1] - gnu[i][0] + 1;     }     for (int i = 0; i < n; i++) {       for (int j = 0; j < siz[i]; j++) {         for (int k = j; k < siz[i]; k++) {           uss[i][siz[i] - (k - j) - 1] =               max(uss[i][siz[i] - (k - j) - 1],                   gnu[i][siz[i] - 1] - gnu[i][0] - (gnu[i][k] - gnu[i][j]));         }       }       uss[i][siz[i]] = gnu[i][siz[i] - 1] - gnu[i][0] + 1;     }     for (int i = 0; i < n; i++) {       if (!siz[i]) continue;       for (int j = p; j >= 0; j--) {         for (int k = 0; k <= siz[i]; k++) {           if (j - k >= 0) f[j] = max(f[j], f[j - k] + uss[i][k]);         }       }     }     cout << ans - f[p];   }   