
C++
Wss0130
这个作者很懒,什么都没留下…
展开
-
C++ map的基本操作和使用
1、map简介map是一类关联式容器。它的特点是增加和删除节点对迭代器的影响很小,除了那个操作节点,对其他的节点都没有什么影响。对于迭代器来说,可以修改实值,而不能修改key。2、map的功能 自动建立Key - value的对应。key 和 value可以是任意你需要的类型。 根据key值快速查找记录,查找的复杂度基本是Log(N),如果有1000个记录,最多查找10次,1,00转载 2012-09-25 21:05:52 · 427 阅读 · 0 评论 -
HDU 1075 What Are You Talking About
#include #include #include using namespace std; int main(){ map dic; map::iterator pos; // 以数组方式插入 string a, b; cin >> a; while (true) { cin >> a; if (a == "END") b原创 2012-09-25 21:20:39 · 466 阅读 · 0 评论