func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = int(1e6) + 10;   int n;   char buffer[MAX_N];   int main() {     gets(buffer);     n = strlen(buffer);     reverse(buffer, buffer + n);     vector<pair<char, int> > v;     for (int i = 0, j, l = -1; i < n; i = j) {       for (j = i; j < n && buffer[j] ==  1 ; j++)         ;       if (j > i + 1) {         if (l == i) {           v.pop_back();         }         v.push_back(make_pair( - , i));         v.push_back(make_pair( + , j));         buffer[l = j--] =  1 ;       } else if (j == i + 1 && l != i) {         v.push_back(make_pair( + , i));       }       j++;     }     cout << (int)v.size() << endl;     for (__typeof((v).begin()) e = (v).begin(); e != (v).end(); ++e) {       printf( %c2^%d n , e->first, e->second);     }   }   