Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
321492 | 董峻昊 | 【C5-9】评奖I | C++ | 通过 | 100 | 1 MS | 260 KB | 497 | 2025-05-10 14:42:30 |
#include<bits/stdc++.h> using namespace std; struct sgh { string n; int m, c, e, g; int t; }s[40]; bool cmp(sgh x, sgh y) { return x.t > y.t; } int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> s[i].n >> s[i].m >> s[i].c >> s[i].e >> s[i].g; s[i].t = s[i].m + s[i].c+ s[i].e + s[i].g; } sort(s, s + n, cmp); for (int i = 0; i < 3; i++) { cout << s[i].n << endl; } return 0; }