Problem

Source: St. Petersburg 2023 9.4=10.4

Tags: combinatorics



One side of a square sheet of paper is colored red, the other - in blue. On both sides, the sheet is divided into $n^2$ identical square cells. In each of these $2n^2$ cells is written a number from $1$ to $k$. Find the smallest $k$,for which the following properties hold simultaneously: (i) on the red side, any two numbers in different rows are distinct; (ii) on the blue side, any two numbers in different columns are different; (iii) for each of the $n^2$ squares of the partition, the number on the blue side is not equal to the number on the red side.