AquaMoon and Chess
HardRating 1900CodeforcesCombinatorics & Modular Arithmetic
Approach hintTry it first, then revealHide
Pair up adjacent pawns greedily from the left; each pair moves as a block through empty cells, while a lone pawn simply adapts around them. Count the arrangements of the blocks among the empty cells with a binomial coefficient.