help!!!
查看原帖
help!!!
1249810
NachoDoritosLOL楼主2024/12/1 15:11
#include<bits/stdc++.h>
using namespace std;
int main(){
	struct info{
		int score;
		char name[30];
	}people[100];
	int n,high=0;
	string hname;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>people[i].name>>people[i].score;
	}
	for(int i=0;i<n;i++){
		if(people[i].score>=high){
			high=people[i].score;
			hname=people[i].name;
		}
	}
	cout<<hname;
	return 0;
}

help!!!

2024/12/1 15:11
加载中...