Approach hintTry it first, then revealHide
Focus on the most frequent task: its copies must be n slots apart, which creates frames the other tasks can fill. Simulate cooling rounds with a max-heap of counts, or count those frames directly.
Focus on the most frequent task: its copies must be n slots apart, which creates frames the other tasks can fill. Simulate cooling rounds with a max-heap of counts, or count those frames directly.