multimap method in C++

* create
```
#include <map>
using namespace std;

struct classComp {
  bool operator() (int l, int r) { return l<r; }
};
bool funComp(int l, int r) { return l<r; }

int main () {
    multimap<int,int> a;  // default constructor
    multimap<int,int> b(a);  // copy constructor
    multimap<int,int> c(move(a));  // move constructor
    multimap<int,int> d{{1,1},{2,1},{3,3},{1,1}};  // initializer list constructor
    // multimap has no fill constructor
    multimap<int,int> f(a.begin(),a.end());  // range constructor

    multimap<int,int>* g = new multimap<int,int>{{1,1},{2,1},{3,3},{1,1}};  // new operator
    delete g;
    
    multimap<int,int,classComp> cc;
    multimap<int,int,decltype(&funComp)> cf(&funComp); 
}
```
* iterator
```
#include <iostream>
#include <map>
using namespace std;
 
int main() {
    multimap<int,int> m{{1,1},{2,1},{3,2},{1,4},{5,1}};
 
    for (auto i = m.begin(); i != m.end(); ++i)
        cout << i->first << "=>" << i->second << " ";
    cout<<endl;    
    for (auto i = m.cbegin(); i != m.cend(); ++i)
        cout << i->first << "=>" << i->second << " ";
    cout<<endl;    
    for (auto i = m.rbegin(); i != m.rend(); ++i)
        cout << i->first << "=>" << i->second << " ";
    cout<<endl;    
    for (auto i = m.crbegin(); i != m.crend(); ++i)
        cout << i->first << "=>" << i->second << " ";
    cout<<endl;    
}
/*
1=>1 1=>4 2=>1 3=>2 5=>1 
1=>1 1=>4 2=>1 3=>2 5=>1 
5=>1 3=>2 2=>1 1=>4 1=>1 
5=>1 3=>2 2=>1 1=>4 1=>1 
*/
```
* add
```
#include <iostream>
#include <map>
using namespace std;

int main ()
{
    multimap<int,int> m;

    m.insert(make_pair<int, int>(2,1));
    m.emplace(make_pair<int, int>(3,1));
    
    for (auto &i:m)
        cout<<i.first<<"=>"<<i.second<<";";
    cout<<endl;
}
// 2=>1;3=>1;
```
* change
```
#include <iostream>
#include <map>
using namespace std;

void p(multimap<int,int>& a) {
    for(auto &i:a) cout<<i.first<<"=>"<<i.second<<";";
    cout<<endl;
}

int main ()
{
    multimap<int,int> a{{1,1},{2,2},{3,3},{4,4},{1,5}};
    multimap<int,int> a1(a), a2(a);

    a.begin()->second=3;
    a.swap(a1);
    p(a);
}
```
* query
```
#include <iostream>
#include <map>
using namespace std;

int main() {
    multimap<int, int> m{{1,1},{1,5},{2,2},{3,2},{4,2}};

    if(auto it=m.find(2)!=m.end()) cout<<"found"<<endl;
    cout<<m.count(2)<<endl;

    auto it=m.begin();
    auto itl = m.lower_bound(3);
    while(it!=itl){
        cout<<it->first<<"=>"<<it->second<<","; it++;
    }
    cout<<endl;

    it=m.upper_bound(3);
    while(it!=m.end()) {
        cout<<it->first<<"=>"<<it->second<<","; it++;
    } 
    cout<<endl;

    auto r=m.equal_range(3);
    for(auto it=r.first; it!=r.second; it++)
        cout<<it->first<<"=>"<<it->second<<",";
    cout<<endl;

    cout<<m.empty()<<endl;
    cout<<m.size()<<endl;
    cout<<m.max_size()<<endl;
}
/*
found
1
1=>1,1=>5,2=>2,
4=>2,
3=>2,
0
5
230584300921369395
*/
```
* delete
```
#include <map>
using namespace std;

int main() {
    multimap<int,int> m{{1,1},{2,2},{3,1},{4,1},{5,1}};

    m.erase(m.begin());
    m.erase(4);
    m.clear();
}
```