Y by
Let
be a positive integer. Each cell of a
square is painted in one of the
colors (with some colors may be missing). We will call any two-cell rectangle a domino, and a domino is called colorful if its cells have different colors. Let
be the total number of colorful dominoes in our square;
be the maximum integer such that every partition of the square into dominoes contains at least
colorful dominoes. Determine the maximum possible value of
over all possible colourings of the square.






