func_code_string: #include <bits/stdc++.h>   using namespace std;   int lss[2000][2000] = {};   int main() {     string s;     cin >> s;     int n = s.length();     if (n == 1) {       cout << 0 << endl;       return 0;     }     for (int i = 0; i < n; i++) {       lss[i][i] = 1;       int temp = s[i];       int zero = 0;       if (s[i] ==  0 ) {         zero++;       }       for (int j = i + 1; j < n; j++) {         if (s[j] ==  1 ) {           lss[i][j] = lss[i][j - 1] + 1;         } else {           zero++;           lss[i][j] = max(zero, lss[i][j - 1]);         }       }     }     for (int i = 0; i < n; i++) {       if (s[i] ==  0 ) {         continue;       }       int temp1 = 0;       int zero = 0;       for (int j = 0; j <= i; j++) {         if (j != i && s[j] ==  1 ) {           temp1 = temp1 + 1;         } else {           zero++;           temp1 = max(zero, temp1);         }       }       int temp2 = 0;       zero = 0;       for (int j = i; j < n; j++) {         if (j != i && s[j] ==  1 ) {           temp2 = temp2 + 1;         } else {           zero++;           temp2 = max(zero, temp2);         }       }       if (temp1 == lss[0][i] && temp2 == lss[i][n - 1]) {         s[i] =  0 ;       }     }     cout << s << endl;     return 0;   }   