Pergunta de entrevista da empresa Jane Street

A probability question involving combinatorics.