Getting wrong answer
@mayank10 it seems you forgot to paste your code and save it. I cannot see any code in your ide. Please save your code.
Also this can be solved using recurence, suppose solve(n) //gives our answer
solve(n) = solve(n-1) + solve(n-2) // first digit is ai so we have n-1 digits remaining and if its is bi, then second digit must be ai so we have n-2 digits left.
If this resolves your doubt mark its as resolved.
@mayank10 Hey your recurrence relation/ relation between dp states is wrong(see the recurrence I mentioned). Also you are not printing in the correct format, see the out put format, you need to use # and everyting.