文章
85
粉丝
0
获赞
601
访问
63.3k
#include <bits/stdc++.h>
using namespace std;
struct student {
int id;
int score;
}s;
bool cmp(student a, student b) {
if (a.score < b.score) return true;
if (a.score ==b.score) {
if (a.id < b.id) return true;
else return false;
}
return false;
}
int main() {
int n;
cin>>n;
vector<string> v;
for (int i=0;i<n;i++) {
string s;
cin>>s;
v.push_back(s);
}
sort(v.begin(), v.end());
for (int i=0;i<v.size();i++) {
cout<<v[i]<<endl;
}
}
登录后发布评论
暂无评论,来抢沙发