Problem

Source: 2012 China Mathematical Olympaid P2

Tags: linear algebra, matrix, geometry, geometric transformation, symmetry, algebra, polynomial



Let $p$ be a prime. We arrange the numbers in ${\{1,2,\ldots ,p^2} \}$ as a $p \times p$ matrix $A = ( a_{ij} )$. Next we can select any row or column and add $1$ to every number in it, or subtract $1$ from every number in it. We call the arrangement good if we can change every number of the matrix to $0$ in a finite number of such moves. How many good arrangements are there?