Problem

Source: 2018 CGMO Day 2 Problem 7

Tags: combinatorics, number theory, modular arithmetic



Given $2018 \times 4$ grids and tint them with red and blue. So that each row and each column has the same number of red and blue grids, respectively. Suppose there're $M$ ways to tint the grids with the mentioned requirement. Determine $M \pmod {2018}$.