//vector
//变长数组,倍增思想
//string,substr()
//queue,push(),front(),pop()
//priority_queue,优先队列,push(),top(),pop()
//stack ,栈,push(),top(),pop()
//deque ,双端队列,队头队尾都可以插入
//set,map,multiset,multimap,基于平衡二叉树(红黑树)
//unordered_set,unordered_map,unordered_multiset,unordered_multimap
//bitset
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
using namespace std;
int main()
{
vector<int> a(10);//vector定义
//vector<int> a(10,3),定义一个长度为10的数组,每个值为3
a.size();//长度
a.empty();//是否为空
a.clear();//清空
a.front();//返回第一个数
a.back();//返回最后一个数
a.push_back();//在最后面插入一个数
a.pop_back(); //删除最后一个数
a.begin();//第一个数的位置
a.end();//最后一个数的位置
//遍历的方法
for(int i = 0;i < 10;i++)a.push_back(i);
for(int i= 0;i < 10;i++)cout<<a[i]<<" ";
cout<<endl;
for(vector<int>::iterator i = a.begin();i != a.end();i++)cout<<*i<<" ";//vector<int>::iterator可以用auto代替
cout<<endl;
for(auto x:a)cout<<x<<" ";
cout<<endl;
pair<int ,string>p;//定义一个二元组
pair<int ,pair<int,int>>x;//可以存放三个
p = make_pair(10,"mtq");
p = {20,"abc"};
queue<int>b;//队列
b.size();
b.empty();
b.push();
b.pop();
b.back();
b.front();
priority_queue<int>heap;//优先队列 ,默认为大根堆
//priority_queue<int,vector<int>,greater<int>>heap;小根堆
heap.clear();
heap.push();
heap.pop();
stack//栈
push();
pop();
top();
empty();
size();
deque//双端队列
push_back();
pop_back();
push_front();
pop_front();
pop();
top();
empty();
size();
[]
set<int>s;//不能有重复元素
multiset<int>ms;//可以有重复元素
size();
empty();
clear();
insert();
find();
count();//返回某个数的个数
erase(x);//删除所有的x
lower_bound();//返回大于等于x的最 小的数
upper_bound();//返回小于等于x 的最大的数
map
multimap
size();
empty();
clear();
begin();
end();
insert(x);//插入的数是一个pair
erase();
find();
[]
biset
return 0;
}