Runtime error(other) in Sums in a triangle (SUMTRIAN)

i am getting runtime error(other) if i declare h[1000] and sigsegv if i declare h[n]
i looked at other at other’s solution and found they had declared two arrays of size
[100][100] and solution was AC .
problem link - SUMTRIAN Problem - CodeChef
solution link - CodeChef: Practical coding for everyone