Problem 757 · Hard
Sort by right end and greedily keep the two latest chosen points, adding the rightmost points needed.
Open the interactive visualisation