Shaovalov A.v.

Fox Alice and Cat Basilio have grown 20 fake banknotes on a tree and are now filling in seven-digit numbers on them. Each banknote has 7 empty cells for digits. Basilio calls out one digit at a time, either "1" or "2" (he doesn't know any other digits), and Alice writes the called digit in any free cell of any banknote and shows the result to Basilio. When all cells are filled, Basilio takes as many banknotes with different numbers as possible (if there are several with the same number, he takes only one), and the rest go to Alice. What is the maximum number of banknotes Basilio can get, no matter how Alice acts?
Basilio can always get two banknotes: he knows where the last digit should be written and names it so that it differs from the digit in the same position on another banknote. Then the numbers on these two banknotes will be different, and the cat can take them.

Let's show how Alice can ensure that there are no more than two different numbers. She arranges the banknotes one on top of the other so that the cells for the digits form a table.

When the cat names a one, Alice writes it in the leftmost column where there is a free cell (in any of the cells), and when the cat names a two - in the rightmost column.

If both ones and twos start appearing in any column, then all other columns are already filled: ones on the left, twos on the right. This means there will be at most one column where both ones and twos appear. Therefore, if the numbers do differ, they will differ only by the digit in this column. Since there are only two digits, there will be no more than two different numbers.

![](https://cdn.mathpix.com/cropped/2024_05_06_411c51e953f1ebed484eg-17.jpg?height=626&width=518&top_left_y=1882&top_left_x=770)

## Answer

2. 

Submit a comment