5分求助
查看原帖
5分求助
1048936
turlng_lk楼主2024/5/19 20:30
#include<bits/stdc++.h>
using namespace std;
long long h=114514;
string j;
struct o
{
	string a;
	int y;
}p[10000];
int main()
{
	int i=0;
	while(1)
	{
		i++;
		cin>>p[i].a>>p[i].y;
		if(p[i].y<h)
		{
			h=p[i].y;
			j=p[i].a;
		}
		if(p[i].a=="Waterloo")
		{
			break;
		}
	}
	cout<<j;
	return 0;
}

2024/5/19 20:30
加载中...