#include <iostream>
#include <unordered_map>
using namespace std;
int main() {
unordered_map<string,double> mapA = {{"sugar",0.1},{"salt",0.2}};
unordered_map<string,double> mapB = {{"sugar",0.3},{"pepper",0.4}};
mapA.insert(mapB.begin(), mapB.end());
for (auto &i : mapA) {
cout << i.first << " " << i.second << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dW5vcmRlcmVkX21hcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJdW5vcmRlcmVkX21hcDxzdHJpbmcsZG91YmxlPiBtYXBBID0ge3sic3VnYXIiLDAuMX0seyJzYWx0IiwwLjJ9fTsKICAgIHVub3JkZXJlZF9tYXA8c3RyaW5nLGRvdWJsZT4gbWFwQiA9IHt7InN1Z2FyIiwwLjN9LHsicGVwcGVyIiwwLjR9fTsKICAgIG1hcEEuaW5zZXJ0KG1hcEIuYmVnaW4oKSwgbWFwQi5lbmQoKSk7CiAgICBmb3IgKGF1dG8gJmkgOiBtYXBBKSB7CiAgICAJY291dCA8PCBpLmZpcnN0IDw8ICIgIiA8PCBpLnNlY29uZCA8PCBlbmRsOwogICAgfQoJcmV0dXJuIDA7Cn0=