#include <iostream>
#include <map>
using namespace std;
//map 广义数组
map <string, long long> a;
map <string, long long>::iterator it;
//key-value pair
int main(){
long long x = -123456789012345;
a["B"] = 2;
a["A"] = 1;
a["C"] = a["A"] + a["B"];
a["X"] = 0;
it = a.end();
it--;
cout << it -> first << " " << it->second << endl;
// for (it = a.begin(); it != a.end(); it++)
// cout << "Key = " << it->first << " Val = " << it->second << endl;
// for (auto i:a)
// cout << "Key = " << i.first << " Val = " << i.second << endl;//C++ 11
// for (auto [k,v]:a)
// cout << "Key = " << k << " Val = " << v << endl; //C++ 14
// a.erase("X");
// if (a.count("X") == 1){
// cout << "key = X存在\n";
// }
// else
// cout << "key = X不存在\n";
// cout << a["C"] << endl;
/*
1.添加: 直接赋值就行
2.删除: erase(key)
3.查询: count(key)
4.修改: 直接赋值也行
5.统计个数: size
*/
}