#include <map>
#include <algorithm>
#include <iostream>
int main()
{
typedef std::map<int, std::wstring> TestMap;
TestMap testMap;
testMap.insert(std::make_pair(0, L"null"));
testMap.insert(std::make_pair(1, L"one"));
for(auto iter = testMap.begin(); iter != testMap.end(); )
{
if (!iter->second.compare(L"one"))
{
testMap.erase(iter++);
}
else
{
++iter;
}
}
std::cout << testMap.size();
}
I2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CiAgICB0eXBlZGVmIHN0ZDo6bWFwPGludCwgc3RkOjp3c3RyaW5nPiBUZXN0TWFwOwogICAgVGVzdE1hcCB0ZXN0TWFwOwogICAgdGVzdE1hcC5pbnNlcnQoc3RkOjptYWtlX3BhaXIoMCwgTCJudWxsIikpOwogICAgdGVzdE1hcC5pbnNlcnQoc3RkOjptYWtlX3BhaXIoMSwgTCJvbmUiKSk7CgogICAgZm9yKGF1dG8gaXRlciA9IHRlc3RNYXAuYmVnaW4oKTsgaXRlciAhPSB0ZXN0TWFwLmVuZCgpOyApCiAgICB7CiAgICAgICAgaWYgKCFpdGVyLT5zZWNvbmQuY29tcGFyZShMIm9uZSIpKQogICAgICAgIHsKICAgICAgICAgICAgdGVzdE1hcC5lcmFzZShpdGVyKyspOwogICAgICAgIH0KICAgICAgICBlbHNlCiAgICAgICAgewogICAgICAgICAgICArK2l0ZXI7CiAgICAgICAgfQogICAgfQoKICAgIHN0ZDo6Y291dCA8PCB0ZXN0TWFwLnNpemUoKTsKfQo=