Problem 2144 · Easy

Minimum Cost of Buying Candies With Discount

Buy every candy at minimum cost when each paid pair can cover one no-more-expensive free candy.

Open the interactive visualisation