题解
这题好简单。
#include <bits/stdc++.h>
using namespace std;
int main()
{
#ifdef ONLINE_JUDGE
#else
freopen("1.txt", "r", stdin);
#endif
string s,maxstr,minstr;
int n,x,y,max=0,min=10000;
cin>>n;
for(int i=0;i<n;i++){
cin>>s>>x>>y;
int tmp=x*x+y*y;
if(tmp>max){
max=tmp;
maxstr=s;
}
if(tmp<min){
min=tmp;
minstr=s;
}
}
cout<<minstr<<" "<<maxstr<<endl;
return 0;
}