📅  最后修改于: 2022-03-11 14:44:46.090000             🧑  作者: Mango
for (set >:: iterator it = a.begin(); it != a.end();/* blank */)
{
cout << it->first << " " << it->second << endl;
if (freq[it->first] == 1 || freq[it->second] == 1)
{
it = a.erase(it);
removed = true;
}
else
{
++it;
}
}