提交时间:2024-09-24 22:23:51
运行 ID: 51703
#include<bits/stdc++.h> using namespace std; int main(){ int numbers, score, classscore, articles, sum; int mostmn = 0; int all = 0; char name, yes1, yes2, nbest; cin >> numbers; for(int i = 0;i < numbers;i++){ sum = 0; cin >> name >> score >> classscore >> yes1 >> yes2 >> articles; if(score > 80){ if(articles > 0){ all += 8000; sum += 8000; } }if(score > 85){ if(classscore > 80){ all += 4000; sum += 4000; } }if(score > 90){ all += 2000; sum += 2000; }if(score > 85){ if(yes2 == 'Y'){ all += 1000; sum += 1000; } }if(classscore > 80){ if(yes1 == 'Y'){ all += 8000; sum += 8000; } } if(sum > mostmn){ mostmn = sum; nbest = name; } } cout << name << endl << mostmn << endl << all; }