Problem

Source: 2017 Belarus Team Selection Test 1.2

Tags: combinatorics, Boards



An $n\times n$ square table is divided into $n^2$ unit cells. Some unit segments of the obtained grid (i.e. the side of any unit cell) is colored black so that any unit cell of the given square has exactly one black side. Find a) the smallest b) the greatest possible number of black unit segments.