直接使用c++11 multiset存输入字符串,自动排序 #include<iostream> #include<set> #include<string> using namespace std; int main() { multiset<string> ms; int num = 0; string str = ""; cin >> num; while (num) { --num; cin >> str; ms.ins...