Problem

Source: Serbian JBMO TST 2018, problem 4

Tags: combinatorics, combinatorics proposed, JBMO TST



Two players are playing the following game. They are alternatively putting blue and red coins on the board $2018$ by $2018$. If first player creates $n$ blue coins in a row or column, he wins. Second player wins if he can prevent it. Who will win if: $a)n=4$; $b)n=5$? Note: first player puts only blue coins, and second only red.