#include <iostream>
#include <map>
int main()
{
std::map<int, int> m { { 4, 4 } };
try
{
std::cout << m.at(4) << std::endl;
m.at(5);
}
catch (std::out_of_range const& e)
{
std::cout << "out_of_range: " << e.what() << std::endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWFwPgoKaW50IG1haW4oKQp7CiAgICBzdGQ6Om1hcDxpbnQsIGludD4gbSB7IHsgNCwgNCB9IH07CgogICAgdHJ5CiAgICB7CiAgICAgICAgc3RkOjpjb3V0IDw8IG0uYXQoNCkgPDwgc3RkOjplbmRsOwoKICAgICAgICBtLmF0KDUpOwogICAgfQogICAgY2F0Y2ggKHN0ZDo6b3V0X29mX3JhbmdlIGNvbnN0JiBlKQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCAib3V0X29mX3JhbmdlOiAiIDw8IGUud2hhdCgpIDw8IHN0ZDo6ZW5kbDsKICAgIH0KCiAgICByZXR1cm4gMDsKfQo=