STL用法
「已注销」
这个作者很懒,什么都没留下…
展开
-
STL用法之set
[C++::STL]之set的用法 c++ set求差集,并集,交集转载 2019-05-09 11:55:32 · 173 阅读 · 0 评论 -
lower_bound 和 upper_bound 功能和用法
以前用这两个函数的时候,简单看了几句别人的博客,记住了大概,用的时候每用一次就弄混一次,相当难受,今天对照着这两个函数的源码和自己的尝试发现:其实这两个函数只能用于 “升序” 序列。 为什么还要加个引号呢?因为比较规则可以自定义,如果你非要把比较规则定义成 5 比 3 小,那么 降序序列也是可以用的,否则不可以,直接看下例子(这是升序序列的 ): #include<bits/std...转载 2019-05-26 09:57:20 · 245 阅读 · 0 评论 -
Problem G: STL——整理唱片(list的使用)
#include<iostream> #include<list> #include<iterator> #include<algorithm> using namespace std; list<int> p; int ii, jj; bool op(int x) /*这个很重要*/ { return x ...原创 2019-05-18 10:49:37 · 385 阅读 · 0 评论