Problem

Source: 2019 Danube

Tags: combinatorics



We color some unit squares in a $ 99\times 99 $ square grid with one of $ 5 $ given distinct colors, such that each color appears the same number of times. On each row and on each column there are no differently colored unit squares. Find the maximum possible number of colored unit squares.