For this Question: A message containing letters from A - Z is been encoded to numbers using the alphabetical order of the number i. e A - > 1, B - > 2,. , Z - >26. 
Given the encoded message your task is to print the number of ways the message can be decoded.Input contains a single line containing the string S.

Constraints:-
1 < = N < = 5000

Note:- String will only contains integers from 0-9Print the number of ways to decode the message.

Note: Since answer can be quite large print your answer modulo 10^9 + 7Sample Input:-
226

Sample Output:-
2

Explanation:- 
BZ VF BBF are the only possible decoded messages

Sample Input:-
102

Sample Output:-
1

Explanation:-
JB is the only possibility, 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 200001
#define MOD 1000000007

#define read(type) readInt<type>()
#define int long long
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'

void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int m[100001];
int solve(int i,string s){
  if (i == s.length()) {
            return 1;
  }
        if (s[i] == '0') {
            return 0;
        }

        if (i== s.length()-1) {
            return 1;
        }

        if (m[i]!=-1) {
            return m[i];
        }

        int ans = solve(i+1, s)%MOD;
        int t=stoi(s.substr(i, 2));
        if ( t<= 26) {
             ans += solve(i+2,s)%MOD;
         }
         ans%=MOD;
m[i]=ans;

        return ans;
}
signed main(){
  
for(int i=0;i<100001;i++){
    m[i]=-1;
}
    string s;
    cin>>s;
    cout<<solve(0,s);
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?