0
已解决
李素妍
新手天翼
新手天翼
#include<iostream>
#include<algorithm>
using namespace std;
struct run{
string m;
int v;
}a[10010];
bool cmp(run x,run y) {
if(x.v!=y.v)return x.v>y.v;
}
int main(){
int n,t;
cin>>n>>t;
for(int i=1;i<=n;i++)cin>>a[i].m>>a[i].v;
sort(a+1,a+n+1,cmp);
for(int i=1;i<=n;i++)cout<<a[i].m<<endl;
return 0;
}