
STL应用
deprecated_tzg
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 3804 Query on a tree
STL中multiset容器的应用,一开始还以为是树链剖分+线段树|RMQ,看来别想太复杂就好 #include #include #include #include #include using namespace std; typedef long long ll; const int MAXN = 100010; #ifndef __GNUC__ #pragma commen原创 2013-09-25 13:53:32 · 748 阅读 · 0 评论 -
hdu 4302 Holedox Eating
STL中priority_queue容器的应用,反正题目就是基于贪心的原则 #include #include #include #include #include #include using namespace std; // http://acm.hdu.edu.cn/showproblem.php?pid=4302 const int MAXN = 100005; prior原创 2013-12-06 17:32:23 · 556 阅读 · 0 评论 -
hdu 4585 Shaolin
无聊发道水题,貌似电脑上的编译器有问题,只好多写了点代码 原理上就是set容器的应用 #include #include #include using namespace std; struct node { int num, grade; }; struct cpS{ bool operator()(const node &a,const node &b){return原创 2013-12-15 00:12:14 · 603 阅读 · 0 评论 -
hdu 4909 String(map)
hdu 4909 String原创 2014-08-31 14:55:52 · 684 阅读 · 0 评论 -
据说是网易游戏面试题
据说是网易游戏面试题 题意: 一条直线上有n个小球,初始坐标及速度已知,且球的初始位置两两不相同。若任意两个球相遇后则两球均消失,找出最后还留在直线上的球。 分析: 题意很清楚明了,任意两个小球之间无非两种情况(一起消失、永不相遇)。那么最先相遇的必然是两个相邻的小球,排除掉这俩球后就又回到了最初的状态。所以把所有球按坐标从小到大排序,用带有排序功能原创 2015-10-25 19:20:35 · 1128 阅读 · 0 评论