func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, bal;   string s, t;   int main() {     ios_base::sync_with_stdio(false);     cin >> s;     n = s.length();     bal = m = 0;     for (int i = n - 1; i >= 0; --i) {       if (s[i] ==  0 )         --bal;       else {         if (bal + m >= 0) {           int j = i;           while (j >= 0 && s[j] ==  1 ) {             s[j] =  0 ;             --j;             ++m;           }           --bal;         } else           ++bal;       }     }     cout << s;     return 0;   }   