题链:
https://www.luogu.org/problemnew/show/P2664题解:
扫描线,线段树维护区间覆盖
https://www.luogu.org/blog/ZJ75211/solution-p2664(直接看这里吧)