Problem

Source: Czech-Polish-Slovak Match 2017 day 2 P2

Tags: Squares, board, combinatorics, maximum



Each of the ${4n^2}$ unit squares of a ${2n \times 2n}$ board ${(n \ge 1) }$ has been colored blue or red. A set of four different unit squares of the board is called pretty if these squares can be labeled ${A,B,C,D}$ in such a way that ${A}$ and ${B}$ lie in the same row, ${C}$ and ${D}$ lie in the same row, ${A}$ and ${C}$ lie in the same column, ${B}$ and ${D}$ lie in the same column, ${A}$ and ${D}$ are blue, and ${B}$ and ${C}$ are red. Determine the largest possible number of different pretty sets on such a board. (Poland)