Problem 3414 · Hard

Maximum Score of Non-overlapping Intervals

Each interval has a start, an end and a weight. Choose at most four intervals with no common point, where touching endpoints count as overlapping, to maximize total weight, and return the lexicographically smallest index list among the best choices.

Open the interactive visualisation