Problem 2919 · Medium

Minimum Increment Operations to Make Array Beautiful

Every three consecutive positions need one value that reaches k, so a small DP chooses which positions to raise and what each costs.

Open the interactive visualisation