Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
42531 奚晨瑞 最高分数的学生姓名 C++ Wrong Answer 1 MS 260 KB 302 2024-03-01 15:18:39

Tests(0/1):


#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= max_num=i; } } cout<<s[max_num].name; return 0; }


Judgement Protocol: