1.2. In Olya's black box, there are 5 apples and 7 pears, and in the white box, there are 12 pears. In one move, Olya can blindly take a fruit from any box and either eat it or move it to the other box. Olya wants the contents of the boxes to be the same. What is the minimum number of moves Olya can guarantee to achieve this? The boxes are closed, and the fruits cannot be identified by touch.
# Answer: 18

Solution. Suppose that in the end both boxes still contain both apples and pears. Then the last action Olya took was to take some fruit from a box, and there were still both apples and pears left. Because of this, she could not guarantee that she would take the needed fruit, as she might have picked the wrong one. Therefore, at the end, only one fruit should remain in each box, and the other needs to be removed.

If we remove the pears, it would require a minimum of 19 actions, and if we remove the apples, it would require a minimum of 12 actions, as the apples might be at the bottom of the box. In this case, there will be between 12 and 18 pears left in the white box, and it will take at least 6 more actions to sort them. Example: remove everything from the black box, and then transfer 6 pears from the white box to the black box.