1

Terry  •  24天前


include <bits/stdc++.h>

using namespace std;

struct student {

string a;
int b;
int c;

};

bool cmp(student x1, student x2) {

return x1.b > x2.b;

}

int main() {

int a;
cin >> a;
student k[105];
for (int i = 0; i < a; i++) {
	cin >> k[i].a >> k[i].b >> k[i].c;
}
sort(k, k + a, cmp);
cout << k[0].a << " " << k[0].b << " " << k[0].c;
return 0;

}


评论:

请先登录,才能进行评论