Problem

Source: Moscow Olympiad 2018, Grade 10, P2

Tags: combinatorics



In there $2018\times 2018$ square cells colored in white or black. It is known, that exists $10 \times 10$ square with only white cells and $10\times 10$ square with only black cells. For what minimal $d$ always exists square $10\times 10$ such that the number of black and white cells differs by no more than $d$?