Problem 3974 · Medium

Maximum Total Sum of K Selected Elements

Take the k largest values and pair the largest with the largest multiplier, so every selection earns as much as possible.

Open the interactive visualisation