#include <iostream>
#include <map>
#include <vector>
#include <sstream>
#include <string>
using namespace std;
int
main ()
{
int mynumbers[] = { 3, 9, 3, 2, 1, 4, 5 };
vector < int >v (mynumbers, mynumbers + 7);
map < int, string > m;;
for (vector < int >::iterator i = v.begin (); i != v.end (); i++)
{
stringstream s;
s << *i;
m.insert (pair < int, string > (*i, s.str ()));
}
pair < map < int, string >::iterator, map < int, string >::iterator > range;
range = m.equal_range (3);
map < int, string >::iterator i = range.first; //LINE I
for (; i != range.second; i++)
{
cout << i->second << ", " << i->first << ", ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKI2luY2x1ZGUgPG1hcD4KCiNpbmNsdWRlIDx2ZWN0b3I+CgojaW5jbHVkZSA8c3N0cmVhbT4KCiNpbmNsdWRlIDxzdHJpbmc+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50Cm1haW4gKCkKewoKICBpbnQgbXludW1iZXJzW10gPSB7IDMsIDksIDMsIDIsIDEsIDQsIDUgfTsKCiAgdmVjdG9yIDwgaW50ID52IChteW51bWJlcnMsIG15bnVtYmVycyArIDcpOwoKICBtYXAgPCBpbnQsIHN0cmluZyA+IG07OwoKICBmb3IgKHZlY3RvciA8IGludCA+OjppdGVyYXRvciBpID0gdi5iZWdpbiAoKTsgaSAhPSB2LmVuZCAoKTsgaSsrKQogICAgewoKICAgICAgc3RyaW5nc3RyZWFtIHM7CgogICAgICBzIDw8ICppOwoKICAgICAgbS5pbnNlcnQgKHBhaXIgPCBpbnQsIHN0cmluZyA+ICgqaSwgcy5zdHIgKCkpKTsKCiAgICB9CgogIHBhaXIgPCBtYXAgPCBpbnQsIHN0cmluZyA+OjppdGVyYXRvciwgbWFwIDwgaW50LCBzdHJpbmcgPjo6aXRlcmF0b3IgPiByYW5nZTsKCiAgcmFuZ2UgPSBtLmVxdWFsX3JhbmdlICgzKTsKCiAgbWFwIDwgaW50LCBzdHJpbmcgPjo6aXRlcmF0b3IgaSA9IHJhbmdlLmZpcnN0OyAgICAvL0xJTkUgSQoKICBmb3IgKDsgaSAhPSByYW5nZS5zZWNvbmQ7IGkrKykKCiAgICB7CgogICAgICAgIGNvdXQgPDwgaS0+c2Vjb25kIDw8ICIsICIgPDwgaS0+Zmlyc3QgPDwgIiwgIjsKCiAgICB9CgogIHJldHVybiAwOwoKfQo=