STL-unordered
This commit is contained in:
20
STL/STL-unordered_map/unordered_multimap.cpp
Normal file
20
STL/STL-unordered_map/unordered_multimap.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
//<2F>÷<EFBFBD><C3B7><EFBFBD>unordered_map - multimapһ<70><D2BB>
|
||||
#include <unordered_map>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main(){
|
||||
unordered_multimap<int, int> m;
|
||||
m.insert({make_pair(1,111), make_pair(2,222), make_pair(3,333), make_pair(8,888), make_pair(6,666), make_pair(5,555)});
|
||||
m.insert({make_pair(1,11), make_pair(2,22), make_pair(1,1)});
|
||||
cout << m.count(1) << " " << m.find(1)->first << "," << m.find(1)->second << endl;
|
||||
m.erase(m.find(1));
|
||||
cout << m.count(1) << " " << m.find(1)->first << "," << m.find(1)->second << endl;
|
||||
m.erase(1);
|
||||
cout << m.count(1) << endl;
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
3 1,1
|
||||
2 1,11
|
||||
0
|
||||
*/
|
Reference in New Issue
Block a user