#include <iostream>
#include <cstdio>
#include <map>
using namespace std;
map<string, int> mmp;
int main(int argc, char** argv) {
mmp["Emma"] = 67;
mmp["Benedict"] = 100;
mmp.insert(pair<string, int>("Bob", 72));
mmp.insert(pair<string, int>("Mary", 85));
mmp.insert(pair<string, int>("Alice", 93));
printf("the size of mmp: %d\n", mmp.size());
printf("the score of Benedict: %d\n", mmp.at("Benedict"));
printf("the score of Mary: %d\n", mmp.at("Mary"));
mmp.erase("Benedict");
map<string, int>::iterator it;
for(it = mmp.begin(); it != mmp.end(); it++){
cout << "the score of " << it->first;
cout << ": " << it->second << endl;
}
mmp.clear();
if(mmp.empty()){
printf("mmp is empty\n");
}else{
printf("mmp is not empty\n");
}
it = mmp.find("Bob");
if(it != mmp.end()){
printf("Bob is found\n");
}else{
printf("Bob is not found\n");
}
printf("the size of mmp: %d\n", mmp.size());
return 0;
}