c Unoromeded_map Проверьте, существует ли ключ
bool checkKey (int key, const std::unordered_map<int, int> &m) {
if (m.find(key) == m.end()) {
return false; //Key is not in the map
}
return true; //Key is in the map
}
DarkBird