Can someone explain why I'm getting a SIGSEV error in this code ?

I have been able to run the code in my native compiler and get the correct answer using some examples. I have also applied a check on the constraints, but I am still getting this error.
Here is the link to my code: Code for TRACE.
Hope someone helps cause I’m new to competitive programming.

Your array size is 100.
Say n = 20, n^2 = 400.
Accessing the array for any index i>99 would give SIGSEGV.