想访问 map<int,int> 的第一项和最后一项的第一维元素,但是在操作过程中,当第二维为 0 时,直接删除该维度,即若 mp[u]=v,v=0 则 mp[u] 直接踢出 map,有什么办法?
map<int,int>
mp[u]=v
v=0
mp[u]
map