C++简洁代码:
#include<bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
vector<string> res(n);
for(int i = 0; i < n; i ++) cin >> res[i];
sort(res.begin(), res.end());
for(string s : res) cout << s << endl;
return 0;
}
京公网安备 11010502036488号