
STL
ConwayTian
一切再来,为时未晚。
毁掉你人生的,其实是你内心的平庸,是你失去追求卓越的那个瞬间。
展开
-
STL priority_queue
struct cmp1 { bool operator ()(int &a,int &b) { return a>b;//最小值优先 } }; struct cmp2 { bool operator ()(int &a,int &b) { return a<b;//最大值优先 } };转载 2012-09-19 12:20:28 · 2323 阅读 · 0 评论 -
2012长春网络赛 B题(贪心+multiset处理二维问题)
题意:Alice 和Bob各有N个矩形,每个矩形都已自己的高和宽,矩形a能够覆盖矩形b的条件是a.h>=b.h && a.w >= b.w。 问:Alice的矩形最多能覆盖多少个Bob的矩形。(每个矩形只能用一次) #include #include #include #include #include using namespace std; //模拟存放节点信息 struct NOD原创 2012-09-19 21:05:51 · 2035 阅读 · 0 评论