Hi, I was solving USACO 262144 Revisited, solved the first 3 subtasks(and mindsolved the fourth one) but I couldn’t make any further progress. I read the editorial, and the key observation(where the number of relevant intervals is O(n log n)) seemed out of nowhere. I call them “potential” problems, since they’re like problems where you need to find a pretty “out there” function to prove the complexity. Some other examples are the second solution to USACO min max subarrays and USACO splitting hayables(I haven’t solved this one but I recall the lazy set solution from when I read the editorial long ago).
Anyways, the point of all this is, are there any tips and/or more practice problems to help me solve these? This has been an area that consistently feels out of reach for me.