# *$Map$*
map::find(key)
map::count(key)
map::lower_bound và map::upper_bound
Hoạt động giống các hàm của set
```c++
#include <bits/stdc++.h>
using namespace std;
int n;
map<string, int> stringToInt;
map<int, long long> intToLongLong;
void solve() {
map<string, int> stringToInt;
map<string, int>::iterator it = stringToInt.begin();
for (auto it = stringToInt.begin(); it != stringToInt.end(); it++) {
cout << (it->first) << ' ' << (it->second) << '\n';
}
for (pair<string, int> i : stringToInt) {
cout << i.first << ' ' << i.second << '\n';
}
}
void inp() {
cin >> n;
solve();
}
int main() {
inp();
return 0;
}
```
{"title":"map","contributors":"[{\"id\":\"cbb26091-71cc-45a7-b556-32fd96a1ecdb\",\"add\":1187,\"del\":511,\"latestUpdatedAt\":1763464294751}]"}