Problem

Source: CGMO 2021 P3

Tags: combinatorics, Coloring



Find the smallest positive integer $n$, such that one can color every cell of a $n \times n$ grid in red, yellow or blue with all the following conditions satisfied: (1) the number of cells colored in each color is the same; (2) if a row contains a red cell, that row must contain a blue cell and cannot contain a yellow cell; (3) if a column contains a blue cell, it must contain a red cell but cannot contain a yellow cell.