优秀的(能偷懒的)STL函数
Lucifer_Bartholomew
2019-01-19 21:31:56
$$\text{(好用请点赞)}$$
------------
| | |
| :-----------: | :----------- |
|$\color{gold}\huge\text{优秀的(能偷懒的)STL函数}$|$\huge\text{-->}$|
|$\color{grey}\text{函数名}$|$\color{green}\text{作用}$|
|sort(start,end)|_将从${*start}$到${*end}$一段容器(数组、vector等)排序_|
|* max_element(start,end)|_求从${*start}$到${*end}$一段容器中的最大值_|
|* min_element(start,end)|_求从${*start}$到${*end}$一段容器中的最小值_|
|swap_ranges(a.start,a.end,b.start)|_将容器a中从${*a.start}$到${*a.end}$一段与容器b中从* b.start开始同样长度的一段交换_|
|next_permutation(start,end)|_求从${*start}$到${*end}$一段容器的下一个全排列_|
|prev_permutation(start,end)|_求从${*start}$到${*end}$一段容器的上一个全排列_|
|* lower_bound(start,end,value)|_返回从${*start}$到${*end}$一段容器中第一个不小于value的值,若没有比value大的值,返回-1_|
|* upper_bound(start,end,value)|_返回从${*start}$到${*end}$一段容器中第一个大于value的值,若没有比value大的值,返回-1_|
|reverse(s.start,s.end)|_反转字符串s从${*start}$到${*end}$的一段_|
|s.substr(s.start,length)|_返回字符串s从${*start}$开始长度为length的一段_|
|* unique(start,end)|_将从${*start}$到${*end}$一段容器中的非重复项移到容器开头,并返回在容器中的最后一个非重复项之后的第一个值(仅能在从小到大排序后使用)_ $\color{red}\text{特殊提醒:}$_重复项不会被清除,而是按原序列顺序排到最后一个非重复项后面_|
|$\color{grey}\text{(仍在开发中……)}$|……|
------------
$\color{grey}\small\text{我是蒟蒻}$