Testcases are not passing , please check if any corner case is not considered

hello @yraj1271
use long long for dp array.

its not working sir then also

check this-> https://ide.codingblocks.com/s/231538
i have changed int to long long.it is working now.

Hey @yraj1271
How can I help you ?

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.