Problem 2813 · Hard

Maximum Elegance of a K-Length Subsequence

Take the k most profitable items, then swap duplicate categories for new ones while the distinct count rises.

Open the interactive visualisation