map

map STL

View Code
//map<vector<int>,int>vis; 可以对一个list进行映射。
//类似于map<map<int,int>,int>vis 之类的都是可以做到的,注意键值需要一一对应。

//begin() 返回指向map头部的迭代器
//clear() 删除所有元素
//count() 返回指定元素出现的次数
//empty() 如果map为空则返回true
//end() 返回指向map末尾的迭代器
//erase() 删除一个元素
//find() 查找一个元素 //if(vis.find(x)!=vis.end())
//insert() 插入元素
//lower_bound() 返回键值>=给定元素的第一个位置
//size() 返回map中元素的个数
原文地址:https://www.cnblogs.com/zhang1107/p/3050405.html