文章
19
粉丝
0
获赞
60
访问
1.9k
#include<bits/stdc++.h>
using namespace std;
const int maxn = 105;
struct node{
int num;
string color;
}st[maxn];
bool cmp(node a,node b){
return a.num > b.num;
}
int main(){
int n;
while(cin >> n){
for(int i=0;i<n;i++){
cin >> st[i].num >> st[i].color;
}
sort(st,st+n,cmp);
for(int i=0;i<n;i++){
cout << st[i].color << endl;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发