set
蜗角虚名羊
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
bzoj2333: [SCOI2011]棘手的操作
题目 题解 set+左偏树 #include<bits/stdc++.h> using namespace std; const int N=300002; int fa[N],l[N],r[N],x,y,w[N],add[N],d[N],n,i,m,rx,ry,v; multiset<int>S; char s[3]; #define gc getchar inline ...转载 2018-12-11 10:53:12 · 208 阅读 · 0 评论 -
bzoj2028: [SHOI2009]会场预约
题目 Solution 假设当前输入的区间为[l,r][l,r][l,r],那么当区间[x,y][x,y][x,y]满足l≤y,x≤rl≤y,x≤rl≤y,x≤r时,两区间相交 我一直在想怎么同时维护左右端点,后来才发现,直接以右端点为关键字,把所有区间放进setsetset里 从小到大枚举≥l≥l≥l的yyy,如果yyy对应的x≤rx≤rx≤r,那么直接删掉 否则,l≤r<x≤yl...原创 2019-03-20 18:33:12 · 254 阅读 · 0 评论
分享