18. Tatiana's teacher drew a $3 \times 3$ grid on the board, with zero in each cell. The students then took turns to pick a $2 \times 2$ square of four adjacent cells, and to add 1 to each of the numbers in the four cells. After a while, the grid looked like the diagram on the right (some of the numbers in the cells have been rubbed out.)
What number should be in the cell with the question mark?
A 9
B 16
C 21
D 29
E 34
SOLUTION
B

Let $P$ be the number of times the top left $2 \times 2$ square was picked; and let $Q, R, S$ be the corresponding numbers for the top right, bottom right and bottom left $2 \times 2$ squares. The cells in the four corners of the $3 \times 3$ grid each appear in exactly one of these $2 \times 2$ squares, so $S=13$ and the number in the cell marked with the question mark is $R$. The middle top cell is increased $P+Q$ times since it belongs to the top left $2 \times 2$ square and the top right $2 \times 2$ square. So $P+Q=18$. The central square belongs to all four $2 \times 2$ squares, so $47=P+Q+R+S=18+R+13=R+31$. Hence $R=16$.