#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
struct p{
string name;
int c;
}a[1001];
int cmp(const void *a,const void *b){
p *p1=(p *)a;
p *p2=(p *)b;
return p2->c-p1->c;
}
int n,m,i,x,y;
int main(){
cin>>n>>m;
for(i=1;i<=n;i++){
cin>>a[i].name>>x>>y;
a[i].c=x+y;
}
qsort(a+1,n,sizeof(a[0]),cmp);
cout<<a[1].name;
return 0;
}
WIKIOI P2935题解
最新推荐文章于 2014-04-02 16:11:59 发布