![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
stl
文章平均质量分 75
力铭君
因为无知与恐惧所以人类才渴望上帝,但这同时也是一切善的源头
展开
-
lower_bound,upper_bound的第四个参数
1.lower_bound的第四个参数的用法: 先看代码: #include using namespace std; struct node{ int x,y; }; struct cmp{ int operator()(const node a,const node b){ return a.x<b.x; } }; int main(){原创 2017-04-18 21:47:41 · 1755 阅读 · 0 评论 -
uva 1595 Symmetry
这个题很有意思,明明可以用数组做,但是我就是想用set写 思路如下: 1匹配y值相同的情况下一条直线上的任意n个点(排序过的)第i 和第n-i个点的中点是否与其他配对的两个点的中点为同一个,如果是同一个,说明它们关于这个x轴(竖线)对称。然后判断所有的点,注意不要忽略某些点有可能在对称轴上的情况。 代码如下: #include #include #include #include #i原创 2016-07-18 11:59:25 · 393 阅读 · 0 评论