Hey guys, I was trying a brute force solution for this problem. My problem is that I am getting NZEC error and am unable to figure out why.
My solution- https://www.codechef.com/viewsolution/15886281
Algorithm- Pretty much brute forced, except that I am storing the result in an array
I think its somewhere in the recursion but am not able to generate any test case for that. Can anyone please help?