Problem 5. The numbers from 1 to 2021 are written on a board. Denis wants to choose 1011 of them such that the sum of any two does not equal 2021 or 2022. How many ways are there to do this?
Solution. Answer: 1.

Among the numbers from 1 to 2021, we can select 1010 non-overlapping pairs of numbers that sum to 2022. Specifically: $(1,2021),(2,2020), \ldots,(1009,1013),(1010,1012)$; only the number 1011 remains unpaired.

According to the condition, from each pair, we can choose no more than one number. Therefore, to choose 1011 numbers, we must select exactly one number from each pair, and also select the number 1011. Then we cannot choose 1010 (otherwise $1011+1010=2021$), but then we must choose 1012 (otherwise nothing is chosen from the last pair). Then we cannot choose 1009 (otherwise $1012+1009=2021$), but then we must choose 1013 (otherwise nothing is chosen from the second-to-last pair). Continuing this process, we find that from each pair, the largest number must be chosen.

If the numbers $1011,1012,1013, \ldots, 2021$ are chosen, the condition of the problem is satisfied (since the sum of any two is at least 2023) and this method of selection is the only one.

## Criteria

The following is the only suitable criterion used:

7 p. Any complete solution to the problem.

3 p. The numbers are divided into pairs, but there is no further progress.

0 6. Only the answer is present.