题解 | #字符串排序(1)#
字符串排序(1)
https://ac.nowcoder.com/acm/problem/52254
c++
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
vector<string> input;
string temp;
int n;
cin>>n;
while (n--){
cin>>temp;
input.push_back(temp);
}
sort(input.begin(),input.end());
for (auto it:input)
cout<<it<<" ";
return 0;
}