In reply to fenil_shah:
Try on paper with a smaller example with a[2][3] and find a solution where the sums of the rows and columns are both 3.
In reply to fenil_shah:
Try on paper with a smaller example with a[2][3] and find a solution where the sums of the rows and columns are both 3.