#include <map>
#include <vector>
#include <iostream>
using namespace std;
int main()
{
vector<int> keys = {0, 1};
map<int, int> m;
m[1] = 5;
m[2] = 12;
for (const int i : keys)
{
m[i]; // touch value
}
for (auto const & kv : m)
{
cout << kv.first << ", " << kv.second << endl;
}
}
ICAgICNpbmNsdWRlIDxtYXA+CiAgICAjaW5jbHVkZSA8dmVjdG9yPgogICAgI2luY2x1ZGUgPGlvc3RyZWFtPgoKICAgIHVzaW5nIG5hbWVzcGFjZSBzdGQ7CgogICAgaW50IG1haW4oKQogICAgewogICAgICAgIHZlY3RvcjxpbnQ+IGtleXMgPSB7MCwgMX07CgogICAgICAgIG1hcDxpbnQsIGludD4gbTsKICAgICAgICBtWzFdID0gNTsKICAgICAgICBtWzJdID0gMTI7CgogICAgICAgIGZvciAoY29uc3QgaW50IGkgOiBrZXlzKQogICAgICAgIHsKICAgICAgICAgICAgbVtpXTsgLy8gdG91Y2ggdmFsdWUKICAgICAgICB9CgogICAgICAgIGZvciAoYXV0byBjb25zdCAmIGt2IDogbSkKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQgPDwga3YuZmlyc3QgPDwgIiwgIiA8PCBrdi5zZWNvbmQgPDwgZW5kbDsKICAgICAgICB9CiAgICB9Cg==