Skip to main content
OlympiadHQ

Browse · MathNet

Print

60th Belarusian Mathematical Olympiad

Belarus counting and probability

Problem

All cells of a table are painted black and white. Per move it is allowed to choose any square, (with the sides coinciding with the sides of the cells) and to change the color of all its cells (from black to white and vice versa). Is it possible to get the table with all white cells from the table with the arbitrary number of black cells?

problem


problem


problem


problem


problem


problem


problem


problem


problem
Solution
We separate the table into five parts: the central square, two rectangles, and two rectangles (see Fig. 1).

Fig. 1

Fig. 2



Fig. 3



Fig. 4 Fig. 5

We can paint white all black cells of the rectangles. It suffices to show how we can paint white any black cell of the rectangle so that all other cells of this rectangle keep their color. The corresponding procedures using and squares are shown in Fig. 2 and Fig. 3.

Further, we can paint white all black cells of the rectangles. It suffices to show how we can paint white any black cell of these rectangles so that all other cells of these rectangles and all cells of the rectangles keep their color. The corresponding procedures are shown in Fig. 4 and Fig. 5.

It remains to paint white all black cells of the central square. It suffices to show how we can paint white any black cell of this square so that all other cells of the table keep their color. The corresponding procedures are shown in Fig. 6. Fig. 6

Techniques

Invariants / monovariantsGames / greedy algorithms