Showing wrong answer

i maintained a 2d prefix sum and then found min for 4 parts.
I tried to dry run it and it is working correct but is showing wrong answer.

Hey @kunal_singhal
Your line 30 is incorrect.
int d = arr[n-1][n-1] - b - c + a;
It should be,
int d = psa[n-1][n-1] - b - c + a;

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.