Problem 3592 · Medium

Inverse Coin Change

Scan amounts in order; a coin is needed exactly when the target count exceeds the count already made, and the gap must be one.

Open the interactive visualisation