3. (17 points) In a $4 \times 5$ grid, 5 crosses need to be placed such that each row and each column contains at least one cross. How many ways can this be done?
# Answer: 240

Solution. From the condition, it follows that in some row, two cells are marked (while in the others, only one each). This row can be chosen in 4 ways, and the two crosses in it can be chosen in $5 \cdot 4 / 2=10$ ways. The remaining three crosses can be chosen in $3 \cdot 2 \cdot 1=6$ ways. By the rule of product, the total number of ways is $4 \cdot 10 \cdot 6=240$.