使用map<int,string>,插入后根据int作为key值来自动排好序,string为每次插入之后在后面增加新的名字,以保证最后可以按照插入的顺序来输出: auto iter = myMap.find(score); if (iter == myMap.end()) myMap.insert(pair<int, string>{score, name}); else { iter->second += " &quo...