Problem

Source: Turkey EGMO TST 2018 #3

Tags: combinatorics, Coloring, counting



In how many ways every unit square of a $2018$ x $2018$ board can be colored in red or white such that number of red unit squares in any two rows are distinct and number of red squares in any two columns are distinct.