开平方是 sqrt
简单题,map都用不上,,
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <string>
#include <cctype>
#include <vector>
#include <cmath>
#include <map>
using namespace std;
double maxx,minn = 10000;
string one,last;
int n;
int main(){
cin >> n;
for(int i=0; i<n; i++){
string a;
int x,y;
double sum;
cin >> a >> x >> y;
sum = sqrt(pow(x,2) + pow(y,2));
if(sum > maxx) {
last = a;
maxx = sum;
}
if(sum < minn) {
one = a;
minn = sum;
}
}
cout << one << " " << last << endl;
return 0;
}