Here’s the working code : https://www.codechef.com/viewsolution/13726415
You did not take no of test cases into consideration, and few other things like that filldp() function were not needed (although not incorrect)
Here’s the working code : https://www.codechef.com/viewsolution/13726415
You did not take no of test cases into consideration, and few other things like that filldp() function were not needed (although not incorrect)
Thanks a lot…Happy Coding