Problem

Source: CGMO 2016 Q1

Tags: combinatorics



Let $n\ge 3$ be an integer. Put $n^2$ cards, each labelled $1,2,\ldots ,n^2$ respectively, in any order into $n$ empty boxes such that there are exactly $n$ cards in each box. One can perform the following operation: one first selects $2$ boxes, takes out any $2$ cards from each of the selected boxes, and then return the cards to the other selected box. Prove that, for any initial order of the $n^2$ cards in the boxes, one can perform the operation finitely many times such that the labelled numbers in each box are consecutive integers.