For this Question: Yogi and Dharam are playing a game in which one has to solve the problem in order to get out of the room. Dharam goes first and Yogi gave him a problem. Since Dharam is having problem solving it, your task is to solve the problem for him.

Problem:-
Given a range from A to B your task is to count the numbers in which the difference between adjacent digits is not more than one.The first line of input contains a single integer T. The next T lines contain two space- separated integers each containing values of A and B.

Constraints:-
1 <= T <= 100
1 <= A, B <= 1000000000000For each test case print the count of numbers in the range [A, B] such that the difference between adjacent digits is not more than one.Sample Input:-
2
10 30
1 10

Sample Output:-
6
10

Explanation:-
10, 11, 12, 21, 22, 23
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, I have written this Solution Code: 
#include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795
#define max1 1001
#define MOD 1000000007

#define read(type) readInt<type>()

#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}

int cnt=0;
inline void solve(int a, int b, int p, int c, int i){
    if(p>b){return;}
if(p>=a){cnt++;}
int x = p%10;
    
p*=10;
    if(i==c){return;}
solve(a,b,p+x,c,i+1);
if(x!=9){
    solve(a,b,p+x+1,c,i+1);
}
if(x!=0){
    solve(a,b,p+x-1,c,i+1);
}

}
signed main(){
    fast();
int t;
cin>>t;
while(t--){
int a,b;
cnt=0;
cin>>a>>b;
if(b<a){out(-1);continue;}
int ans=b;
    int c=0;
    while(ans){
        c++;
        ans/=10;
    }
for(int i=1;i<=9;i++){
solve(a,b,i,c,1);
}
out(cnt);
}


}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?