Ques link:- https://www.codechef.com/problems/CD1IT4
My code:- https://ide.codingblocks.com/s/43259
What’s wrong with my recursive approach. My code is passing sample but getting error while submitting
Ques link:- https://www.codechef.com/problems/CD1IT4
My code:- https://ide.codingblocks.com/s/43259
What’s wrong with my recursive approach. My code is passing sample but getting error while submitting
you are not using mod . It is mentioned in question that u have to print ans modulo 1000000007.
Hit like if u get it.
yes i know that but it should give WA while submitting but is is giving TLE.
Question has a couple of corner cases, take care of those.
Cheers!
I figured out the mistake . Thanks btw