func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Dbg {     template <typename T>     Dbg& operator,(const T& v) {       cerr << v <<  ,  ;       return *this;     }   } Dbg;   template <typename T>   ostream& operator<<(ostream& _o_, const vector<T>& _v_) {     if (!_v_.empty()) {       _o_ <<  [ ;       copy(_v_.begin(), _v_.end(), ostream_iterator<T>(_o_,  ,  ));       _o_ <<   b b] ;     }     return _o_;   }   mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());   vector<long long> num;   long long dp[30][3][15][15];   long long sz;   long long solve(long long pos, bool f, long long first, long long last) {     if (pos == sz) {       if (first == last) {         return 1;       }       return 0;     }     if (dp[pos][f][first][last] != -1) return dp[pos][f][first][last];     long long ans = 0;     long long mx = 0;     if (sz < num.size()) {       mx = 9;     } else {       if (f == 0) {         mx = num[pos];       } else {         mx = 9;       }     }     for (long long digit = 0; digit <= mx; digit++) {       bool tmpf = f;       long long tmpfirst = first;       if (pos == 0 && digit == 0 && sz > 1) continue;       if (pos == 0) tmpfirst = digit;       if (digit < mx) tmpf = 1;       ans += solve(pos + 1, tmpf, tmpfirst, digit);     }     return dp[pos][f][first][last] = ans;   }   long long solve(long long b) {     if (b == 0) {       return 1;     }     num.clear();     while (b > 0) {       num.push_back(b % 10);       b /= 10;     }     reverse(num.begin(), num.end());     long long ans = 0;     for (long long q = 1; q <= num.size(); q++) {       sz = q;       for (long long i = 0; i <= 19; i++) {         for (long long j = 0; j < 2; j++) {           for (long long k = 0; k < 10; k++) {             for (long long l = 0; l < 10; l++) {               dp[i][j][k][l] = -1;             }           }         }       }       ans += solve(0, 0, 0, 0);     }     return ans;   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     long long l, r;     cin >> l >> r;     cout << solve(r) - solve(l - 1);     return 0;   }   