Problem 2576 · Medium

Find the Maximum Number of Marked Indices

Sort the values, then pair the smallest available value with the smallest large-enough partner.

Open the interactive visualisation