unordered map method in C++

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

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

    unordered_map<int,int>* g = new unordered_map<int,int>{{1,1},{2,1},{3,3},{1,1}};  // new operator
    delete g;
}
```
* iterator
```
#include <iostream>
#include <unordered_map>
using namespace std;
 
int main() {
    unordered_map<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;    
}
/*
5=>1 3=>2 2=>1 1=>1 
5=>1 3=>2 2=>1 1=>1 
*/
```
* add
```
#include <iostream>
#include <unordered_map>
using namespace std;

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

    m[1]=1;
    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;
}
// 3=>1;2=>1;1=>1;
```
* change
```
#include <iostream>
#include <unordered_map>
using namespace std;

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

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

    a.begin()->second=3;
    a[1]=10;    
    a.at(2)=8;
    a.swap(a1);
    p(a);
}
```
* query
```
#include <iostream>
#include <unordered_map>
using namespace std;

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

    cout<<m.at(1)<<","<<m[2]<<endl;

    if(auto it=m.find(2)!=m.end()) cout<<"found"<<endl;
    cout<<m.count(2)<<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;
}
/*
1,2
found
1
3=>2,
0
4
576460752303423487
*/
```
* delete
```
#include <unordered_map>
using namespace std;

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

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