Phoenix and Science
HardRating 1900CodeforcesConstructive Algorithms
Approach hintTry it first, then revealHide
The number of bacteria can at most double each day, so try making the nightly mass gains 1, 2, 4, ... plus one leftover value. Sort these gains; consecutive differences tell how many bacteria must split on each day.