Giving Segmentation fault


#1

giving segmentation fault on [0,0] but if i runs same thing as custom input it gives me correct output.
Please fix it asap.


#2

You might be doing this
int n = A.size();
int m= A[0].size();
if(n==0 && m==0)
{
return 0;
}

but correct way is
int n = A.size();
if(n==0)
{
return 0;
}
int m= A[0].size();