Problem 3347 · Hard

Maximum Frequency of an Element After Performing Operations II

Try each target value within k of a number; numbers already equal to it are free, and nearby numbers can be moved until the operations run out.

Open the interactive visualisation