Can somebody explain why I got WA when declared the array "dp" outside main in this solution:
https://www.codechef.com/viewsolution/8884014
whereas AC when declared in main :
https://www.codechef.com/viewsolution/8884063
The only difference in the two solutions is only the position of declaration of the array. I was also initialising the array to 0 for each test case.