#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
//1110
const int maxn=1e5+10;
struct M{
int w;
char c[11];
bool operator < (const M &a) const{
return w>a.w;
}
};
vector<M> m;
int main(){
int n;
//freopen("E://PAT/input.txt","r",stdin);
while(scanf("%d",&n)!=EOF){
M tmp;
m.clear();
for(int i=0;i<n;i++){
scanf("%d %s",&tmp.w,tmp.c);
m.push_back(tmp);
}
sort(m.begin(),m.end());
for(int i=0;i<m.size();i++)
printf("%s\n",m[i].c);
}
return 0;
}
/**************************************************************
Problem: 1110
User: cust123
Language: C++
Result: Accepted
Time:0 ms
Memory:1524 kb
****************************************************************/
题目1110:小白鼠排队
最新推荐文章于 2023-11-17 17:14:43 发布