map は必ず key でソートされるものです。
以下、例です。
typedef map<int, int> INTMAP;
INTMAP myMap;
myMap.insert(INTMAP::value_type(300, 2));
myMap.insert(INTMAP::value_type(200, 3));
myMap.insert(INTMAP::value_type(100, 5));
myMap.insert(INTMAP::value_type(400, 4));
myMap.insert(INTMAP::value_type(500, 1));
INTMAP::const_iterator it;
for (it = myMap.begin(); it != myMap.end(); it++)
{
cout << "(" << (*it).first << ", " << (*it).second << ")" << endl;
}
出力:
(100, 5)
(200, 3)
(300, 2)
(400, 4)
(500, 1)
つまり、map を使って value でソートはできません。
EggRoll さんの例をみると、key と value を入れ替えれば簡単だと思いますが。
(key の重複はできませんけど)
あとは、vector とか list を使って pair を管理するしかないのでは。