Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: rice_ot
Problemset: นักสร้างเกม
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-14 12:48:13
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
vector<pair<string, double>> name(n);
for(auto& i : name){
cin>>i.first;
i.second = 0;
}
for(int i = 0; i<n; i++){
for(int j = 0; j<2; j++){
string x; double a, b; cin>>x>>a>>b;
if(a> 10) name[i].second+=b;
}
}
string na; double high = 0;
for(auto& i : name){
if(i.second > high){
high = i.second;
na = i.first;
}
}
cout<<na<<" is the strongest with "<<high<<" units";
}