稻花香里说丰年,听取WA声一片
查看原帖
稻花香里说丰年,听取WA声一片
1164268
plkmnji888楼主2024/10/23 19:51

哪位大佬能帮我看看```cpp #include<bits/stdc++.h> using namespace std; struct good_stu { string name; int sum; }good_stu; int main() { int n, max = INT_MIN, mistd = 0; cin >> n; for (int i = 0; i < n; i++) { string name; char bitchse, estnucd; int end_bitset, classbants, sum; bool prcsti; cin >> name >> end_bitset >> classbants >> bitchse >> estnucd >> prcsti; if (classbants > 80 and bitchse == 'Y') sum = sum + 850; if (end_bitset > 85 and estnucd == 'Y') sum = sum + 1000; if (end_bitset > 90) sum = sum + 2000; if (end_bitset > 85 and classbants > 80) sum = sum + 4000; if (classbants > 80 and prcsti) sum = sum + 8000; mistd = mistd + sum; if (max < sum) { max = sum; good_stu.name = name; good_stu.sum = sum; } } cout << good_stu.name << '\n' << good_stu.sum << '\n' << mistd; return 0; }

2024/10/23 19:51
加载中...