Problem 2656 · Easy

Maximum Sum With Exactly K Elements

Greedy: always take the current maximum, then increment it for the next operation.

Open the interactive visualisation