摘要: D:思路:暴力维护优化.用大顶堆来维护,删除元素同时放入两半区间注意的是优先队列默认为最大堆,所以cmp重载,符号需要都和我们想要的结果相反.即(> > = <,> < = >). Code: typedef tuple<int,int,int> ple;//len,l,r struct cmp { 阅读全文
posted @ 2020-05-16 11:08 levill 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-05-16 09:47 levill 阅读(119) 评论(0) 推荐(0) 编辑