Segmentation Fault error

My code is showing segmentation fault error and its only happening in coding blocks ide .
My code is - https://ide.codingblocks.com/s/307144

while searching you are denoting j for row and i for column but while comparing you are doing opposite so while comparing instead of a[i][j] use a[j][i]
Corrected Code

Still it is showing the same error .
Can you help me out with this ?

i have sent you the corrected code.

But it is still showing the same error

it is passing all the test cases for me please make sure you are submitting the correct solution

Yes i am . I dont know why is it showing so

try submitting at this link:
https://hack.codingblocks.com/app/contests/1674/501/problem

Yes this link worked .

Can you please tell me why we reversed i and j at the time of search

In a[i][j] i refers to the row and j refers to the column but when you put j = n - 1, since there were n rows it meant j referred to row so we reversed i, j.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.