func_code_string: #include <bits/stdc++.h>   using namespace std;   const int limit = 3000000;   const int tope = 100000;   int absolut(int x) {     if (x < 0) return -x;     return x;   }   void die() {     cout << -1 << endl;     exit(0);   }   int n;   int a[limit];   int b[limit];   int add[limit];   long long int nsol;   vector<pair<int, int> > vsol;   void fix(int pos) {     while (int(vsol.size()) < tope and add[pos] > 0 and a[pos] < 9 and            a[pos + 1] < 9) {       a[pos]++;       a[pos + 1]++;       add[pos]--;       vsol.push_back(pair<int, int>(pos, 1));     }     while (int(vsol.size()) < tope and add[pos] < 0 and a[pos] > 0 and            a[pos + 1] > 0) {       a[pos]--;       a[pos + 1]--;       add[pos]++;       vsol.push_back(pair<int, int>(pos, -1));     }   }   int main() {     ios::sync_with_stdio(false);     cin >> n;     for (int i = 1; i <= n; i++) {       char c;       cin >> c;       a[i] = c -  0 ;     }     for (int i = 1; i <= n; i++) {       char c;       cin >> c;       b[i] = c -  0 ;     }     for (int i = 1; i < n; i++) {       add[i] = b[i] - (a[i] + add[i - 1]);       nsol += absolut(add[i]);     }     if (a[n] + add[n - 1] != b[n]) die();     while (int(vsol.size()) < nsol and int(vsol.size()) < tope) {       for (int pos = 1; pos < n and int(vsol.size()) < tope; pos++) fix(pos);       for (int pos = n - 1; pos >= 1 and int(vsol.size()) < tope; pos--) fix(pos);     }     cout << nsol << endl;     for (int i = 0; i < int(vsol.size()) and i < tope; i++)       cout << vsol[i].first <<     << vsol[i].second << endl;   }   