Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: anonymous
Problemset: นักสร้างเกม
Language: cpp
Time: 0.002 second
Submitted On: 2026-11-08 18:16:13
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;cin >> n;
vector<pair<string, long long>> 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;
long long a,b; cin >> x >> a >> b;
if(a > 10) name[i].second += b;
}
}
string name_win;
long long high = 0;
for(auto& i : name){
if(i.second > high){
high = i.second;
name_win = i.first;
}
}
cout << name_win << " is the strongest with " << high << " unit";
}