
set
poursoul
这个作者很懒,什么都没留下…
展开
-
【HDU】5604 merge【set练习题】
题目链接:merge#include <stdio.h> #include <string.h> #include <set> #include <algorithm> using namespace std ;#define clr( a , x ) memset ( a , x , sizeof a )const int MAXN = 300005 ;set < int > s[MAXN] ;原创 2016-10-08 20:12:55 · 839 阅读 · 0 评论 -
【HDU】5549 Walk Around The Campsite【极角排序+set+最短路dp】
题目链接:Walk Around The Campsite要知道多边形的边只会在端点相交。则如果以一个点为原点,作射线,然后旋转,那么遇到边的左端点我们往set插入线段,遇到边的右端点我们删除线段,那么任意时刻在set中的线段和射线的交点到原点的距离的大小关系是相对不变的。那么我们就可以通过动态维护set的操作符’<’动态维护线段距离原点的远近了。 接下来就很简单了,枚举原点,然后极角排序,然后转原创 2016-10-23 22:23:12 · 1535 阅读 · 0 评论 -
【HDU】5574 Colorful Tree【子树染色,询问子树颜色数——线段树+bit+lca+set】
题目链接:【HDU】5574 Colorful Tree#include <bits/stdc++.h> using namespace std ;typedef long long LL ; typedef pair < int , int > pii ; #define clr( a , x ) memset ( a , x , sizeof a )const int MAXN = 100005原创 2016-11-01 11:19:28 · 2500 阅读 · 0 评论