There are 25 "ones" arranged in a 5*5 matrix.

You are requested to erase n ones leaving a matrix in which the quantities of "ones" in each column and each row are divisible by 3.

How many distinct solutions are there, provided you do not erase the "one" in the upper left corner?

(In reply to

solution by Charlie)

This arrangement has 3 ones in all five rows and columns and satisfies keeping the 1 in the upper left corner.

1 1 0 0 1

1 1 0 1 0

1 1 1 0 0

0 0 1 1 1

0 0 1 1 1

There are 6 ways to arrange the upper right 3x3 submatrix for 5 more arrangements. Then this variant adds 6 more.

1 0 0 1 1

1 0 1 0 1

1 1 0 0 1

0 1 1 1 0

0 1 1 1 0

Just by choosing which 1 gets to be in the upper corner, I count at least 6*15=90 more ways of populating the matrix. Then there are arrangements which more agressivly permute the rows/columns, like this one

1 0 1 1 0

0 1 1 0 1

1 0 0 1 1

1 1 0 1 0

0 1 1 0 1