fork download
  1. #include<iostream>
  2. #include<vector>
  3. #include<string>
  4. using namespace std;
  5. int main(){
  6. int n, a[50], b[50], c[50], d[50], e[50], p[50], m[50], bestp = 0, best, points;
  7. char s[50];
  8. vector<string>v;
  9. cin >> n;
  10.  
  11. for (int i = 0; i < n; i++){
  12. cin >>s>> p[i] >> m[i] >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
  13. v.push_back(s);
  14. points = a[i] + b[i] + c[i] + d[i] + e[i] + p[i] * 100 - m[i] * 50;
  15. if (points > bestp){
  16. bestp = points;
  17. best = i;
  18. }
  19. }
  20. cout << v[best]<<endl;
  21. return 0;
  22. }
Runtime error #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
Standard output is empty