Problem 2218 · Hard
Take exactly k coins from pile tops with the greatest total value.
Open the interactive visualisation