//字串排序
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

bool comp(const string &s1,const string &s2){
return s1<s2;
}

int main(){
int n;
vector<string>s;
while(cin>>n){
while(n!=0){
n--;
string t;
cin>>t;
s.push_back(t);
}
sort(s.begin(),s.end(),comp);
for(int i=0;i<s.size();i++){
cout<<s[i]<<endl;
}
}
return 0;
}
全部评论

相关推荐

投递长鑫存储等公司7个岗位
点赞 评论 收藏
分享
06-12 16:23
已编辑
小米_软件开发(准入职员工)
点赞 评论 收藏
分享
但听说转正率很低,我现在有在实习了,好纠结要不要去
熬夜脱发码农:转正率低归低,但是实习的经历你可以拿着,又不是说秋招不准备了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务