Problem 2954 · Hard

Count the Number of Infection Sequences

Interleave the healthy runs with multinomials, and give each run between two sick children a factor of two for its direction.

Open the interactive visualisation