提交时间:2024-11-01 17:02:47
运行 ID: 54994
#include<iostream> using namespace std; struct node{ string name; double score; }s[100]; int main() { int n,max,max_num; max=-1; cin>>n; for(int i=0;i<n;i++){ cin>>s[i].score>>s[i].name; if(s[i].score>max){ max=s[i].score; max_num=i; } } cout<<s[max_num].name; return 0; }