STL

Posted 637w

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了STL相关的知识,希望对你有一定的参考价值。

STL:
容器与迭代器的概念
重载运算符

vector:
v.size();
v.push_back();
v[i];

set:
set.insert();
set.erase();
set.begin();
set.end();指到最后一个的后一个
set.count();
set.lower_bound();
set.upper_bound();
set.size();

priority_queue:
Q.push();
Q.pop();
Q.size();
Q.top();
实现普通堆

multiset:
和set类似,删除的时候特别注意

string:
动态开空间

deque:
deq.front();
deq.back();
deq.push_front(x);
deq.pop_front();
deq.push_back(x);
deq.pop_back();

lower_bound();
upper_bound();

string:
动态开空间

重载运算符:

bool operator < (const Vergil &x) const
{

}

https://vjudge.net/problem/UVA-10815
https://www.luogu.org/problemnew/show/P3378

 

以上是关于STL的主要内容,如果未能解决你的问题,请参考以下文章

(C++基础_STL) —— 初识STL

STL是啥意思?

STL是啥

STL学习第一章 了解STL

C++ STL应用与实现0: 感恩STL——STL, ACM和年轻的我们

如何用vtk读取stl模型获取点