Vítek has written down two numbers, 541 and 293. From the six digits used, he first needs to strike out two such that the sum of the two resulting numbers is the largest possible. Then, he needs to strike out two digits from the original six digits such that the difference between the two resulting numbers is the smallest possible (subtracting the smaller number from the larger one). Which digits should he strike out?

(M. Petrová)
First, we will be crossing out digits so that the sum is as large as possible. We can either cross out two digits from the first number, or we can cross out two digits from the second, or we can cross out one digit from each number. In each case, we cross out digits so that the resulting sum is as large as possible. We get the following numbers:

- cross out 4 and 1, leaving 5 and 293: sum 298,
- cross out 2 and 3, leaving 541 and 9: sum 550,
- cross out 1 and 2, leaving 54 and 93: sum 147.

We see that the largest sum (550) is obtained by crossing out the digits 2 and 3 from the second number.

Now we will look for the smallest difference. Again, we can cross out two digits from one number, or two digits from the other, or one digit from each number. If we were to cross out two digits from one number, the difference would always be a three-digit number. When we cross out one digit from each number, we get the following numbers:

- cross out 5 and 2, leaving 41 and 93: difference 52,
- cross out 5 and 9, leaving 41 and 23: difference 18,
- cross out 5 and 3, leaving 41 and 29: difference 12,
- cross out 4 and 2, leaving 51 and 93: difference 42,
- cross out 4 and 9, leaving 51 and 23: difference 28,
- cross out 4 and 3, leaving 51 and 29: difference 22,
- cross out 1 and 2, leaving 54 and 93: difference 39,
- cross out 1 and 9, leaving 54 and 23: difference 31,
- cross out 1 and 3, leaving 54 and 29: difference 25.

We see that the smallest difference (12) is obtained by crossing out 5 from the first number and 3 from the second number.