Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: anonymous

Problemset: นักสร้างเกม

Language: cpp

Time: 0.004 second

Submitted On: 2026-11-08 18:16:58

#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 << " units";
}