func_code_string: #include <bits/stdc++.h>   char buf[1 << 21], *p1 = buf, *p2 = buf;   using namespace std;   template <class T>   void rd(T &k) {     char c =         (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)              ? EOF              : *p1++);     int f = 1;     k = 0;     while (c <  0  || c >  9 ) {       if (c ==  - ) f *= -1;       c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)                ? EOF                : *p1++);     }     while (c >=  0  && c <=  9 ) {       k = k * 10 + c -  0 ;       c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)                ? EOF                : *p1++);     }     k *= f;   }   const int N = 300005;   int n, m, k, t, x, a[N], f[N];   int c[N], d[N];   long long ans;   char p[N];   queue<int> q;   int ok(int x) {     if (a[x] > 0 && c[x - 1] + 1 <= 9 && c[x] + 1 <= 9) return 1;     if (a[x] < 0 && c[x - 1] - 1 >= 0 && c[x] - 1 >= 0) return 1;     return 0;   }   int main() {     cin >> n;     cin >> p + 1;     for (int i = 1; i <= n; ++i) c[i] = p[i] - 48;     cin >> p + 1;     for (int i = 1; i <= n; ++i) d[i] = p[i] - 48;     for (register int i = 1; i < n; ++i) {       a[i + 1] = d[i] - (c[i] + a[i]);       ans += abs(a[i + 1]);     }     if (c[n] + a[n] != d[n]) return cout << -1, 0;     cout << ans <<   n ;     int xx = min(ans, 100000ll);     for (register int i = 2; i <= n; ++i) {       if (a[i] > 0 && c[i - 1] + 1 <= 9 && c[i] + 1 <= 9) q.push(i), f[i] = 1;       if (a[i] < 0 && c[i - 1] - 1 >= 0 && c[i] - 1 >= 0) q.push(i), f[i] = 1;     }     int x;     while (xx--) {       x = q.front();       q.pop();       while (f[x] == 0) {         x = q.front();         q.pop();       }       if (a[x] > 0) {         cout << x - 1 <<   1 n ;         ++c[x - 1];         ++c[x];         --a[x];       } else {         cout << x - 1 <<   -1 n ;         --c[x - 1];         --c[x];         ++a[x];       }       if (ok(x))         q.push(x);       else         f[x] = 0;       if (x >= 3) {         if (ok(x - 1)) {           if (f[x - 1] == 0) q.push(x - 1);           f[x - 1] = 1;         } else           f[x - 1] = 0;       }       if (x <= n - 1) {         if (ok(x + 1)) {           if (f[x + 1] == 0) q.push(x + 1);           f[x + 1] = 1;         } else           f[x + 1] = 0;       }     }   }   