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

link to ques. TRISQ Problem - CodeChef
link to sol. CodeChef: Practical coding for everyone

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