随笔分类 -  数据结构 - 线段树

摘要:将区间按照长度排序,每次将相同长度的区间插入,直到有一个点能被至少m个区间覆盖,这个可以用线段树维护。 这时我们就可以删除长度小的区间直到不满足条件。 重复做就可以了 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 # 阅读全文
posted @ 2018-07-02 21:44 大财主 阅读(186) 评论(0) 推荐(0)
摘要:2212: [Poi2011]Tree Rotations Description Byteasar the gardener is growing a rare tree called Rotatus Informatikus. It has some interesting features: 阅读全文
posted @ 2018-06-07 17:25 大财主 阅读(180) 评论(0) 推荐(0)