Problem

Source: 43rd International Tournament of Towns, Senior O-Level P3, Fall 2021

Tags: combinatorics, board, Tournament of Towns



In a checkered square of size $2021\times 2021$ all cells are initially white. Ivan selects two cells and paints them black. At each step, all the cells that have at least one black neighbor by side are painted black simultaneously. Ivan selects the starting two cells so that the entire square is painted black as fast as possible. How many steps will this take? Ivan Yashchenko