CodeForces 1555E Boring Segments

题目传送门:CodeForces 1555E Boring Segments


Statement:


Solution:

首先肯定考虑two-points,接下来的问题就是如何判断一个区间是否合法。线段树打标记维护最小值即可,时间复杂度为\(\mathcal O(N\log_2N)\)

code

posted @ 2021-08-19 09:19  Beginner2670  阅读(29)  评论(0)    收藏  举报