Problem

Source: 2022 Thailand Online MO P4

Tags: combinatorics



There are $2022$ signs arranged in a straight line. Mark tasks Auto to color each sign with either red or blue with the following condition: for any given sequence of length $1011$ whose each term is either red or blue, Auto can always remove $1011$ signs from the line so that the remaining $1011$ signs match the given color sequence without changing the order. Determine the number of ways Auto can color the signs to satisfy Mark's condition.