i am getting a runtime error in my solution.here is a link to question as well as my solution.

link to ques. http://www.codechef.com/problems/TRISQ
link to sol. http://www.codechef.com/viewsolution/6882812

in this problem we need to determine how many 2x2 squares fit inside an isosceles right angled triangle

You’re declaring the array with size of 50,where as the constraints are

1 ≤ T ≤ 10^3

This is why you are getting. Increase the array size.

even with array size of 2000 its giving runtime error