Binary Strings : Bottom Up

I have tried to write a bottom up DP code but 2/3 test cases failed.

I have put my code on ideone since i could not find the link generation option on cb.lk/ide

hi @gautam74
just make int as long long int, as ans is going beyond the range int…
ur code will pass all test cases…
corrected code --> https://ide.codingblocks.com/s/643940

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.