Camila and Lara each have a $4 \times 4$ board. Starting with both boards blank, they play a game with the following sequence of events.

- Camila, hidden from Lara, paints some squares on her board black.
- Still on her board, Camila writes in each square the number of adjacent squares that are painted black (two distinct squares are adjacent if they share a side or a vertex).
- Camila copies the numbers written on her board onto Lara's board.
- Lara must guess, based on the numbers written on her board, how many squares on Camila's board are black.

For example, if Camila paints her board as shown in the left figure, then she places the numbers on Lara's board as shown in the right figure.

| 1 | 1 | 3 | 1 |
| :--- | :--- | :--- | :--- |
| 2 | 3 | 2 | 2 |
| 1 | 3 | 1 | 1 |
| 1 | 2 | 0 | 0 |

How many squares did Camila paint if Lara's board has the numbers from the following board?
(a) 3
(d) 6
(b) 4
(e) 7
(c) 5

| 1 | 2 | 1 | 1 |
| :--- | :--- | :--- | :--- |
| 0 | 2 | 1 | 2 |
| 2 | 3 | 3 | 1 |
| 1 | 0 | 2 | 1 |
The correct option is (b).

First, we note that if a cell has the digit 0, then none of its neighboring cells can be painted. Therefore, the cells marked with an $\times$ in the figure on the right were not painted.

![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-043.jpg?height=186&width=545&top_left_y=341&top_left_x=1258)

Now, consider the cell in the upper right corner, which has the number 1. It has three neighbors, and we already know that two of them were not painted.

![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-043.jpg?height=180&width=523&top_left_y=567&top_left_x=1269)

Therefore, the remaining neighbor (the cell immediately below) was painted. We can apply the same argument to the cells in the lower left and lower right corners.

![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-043.jpg?height=171&width=545&top_left_y=788&top_left_x=1258)

Now, we look at the 2 in the last row. Since this cell already has two painted neighbors, all its other neighbors were not painted.

The same argument applies to the cell in the second row and third column, as it has a 1 and already has one of its neighbors painted. Therefore, its other three neighbors were not painted.
![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-043.jpg?height=176&width=548&top_left_y=1002&top_left_x=1254)

Finally, we use the 3 that appears in the cell in the third row and third column. This cell already has two painted neighbors, so there must be one more of its neighbors painted.
![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-043.jpg?height=390&width=548&top_left_y=1224&top_left_x=1256)

This neighbor can only be the blank cell in the figure above, and we can complete the table. We conclude that the number of painted cells is 4.