Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: gay69

Problemset: HR

Language: cpp

Time: 0.003 second

Submitted On: 2026-04-16 13:25:55

#include <bits/stdc++.h>
#define F first
#define S second

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tlll;
typedef tuple<ll, ll, ll, ll> tllll;

const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll maxn = 5e5 + 5;

void mains() {
    string s, s2;
    ll atk, def, spd, atk2, def2, spd2;
    cin >> s >> s2 >> atk >> def >> spd >> atk2 >> def2 >> spd2;
    if ((atk + def + spd) > (atk2 + def2 + spd2)) {
        cout << "Win: " << s << "\n";
        return;
    }
    else if ((atk + def + spd) < (atk2 + def2 + spd2)) {
        cout << "Win: " << s2 << "\n";
        return;
    }
    if (atk > atk2) {
        cout << "Win: " << s << "\n";
        return;
    }
    else if (atk < atk2) {
        cout << "Win: " << s2 << "\n";
        return;
    }
    if (spd > spd2) {
        cout << "Win: " << s << "\n";
        return;
    }
    else if (spd < spd2) {
        cout << "Win: " << s2 << "\n";
        return;
    }
    if (s[2] == '3' && s2[2] != '3') {
        cout << "Win: " << s << "\n";
        return;
    }
    else if (s[2] != '3' && s2[2] == '3') {
        cout << "Win: " << s2 << "\n";
        return;
    }
    if (s.substr(s.size() - 2) == "21" && s2.substr(s2.size() - 2) != "21") {
        cout << "Win: " << s << "\n";
        return;
    }
    else if (s.substr(s.size() - 2) != "21" && s2.substr(s2.size() - 2) == "21") {
        cout << "Win: " << s2 << "\n";
        return;
    }
    if (s.substr(0, 2) < s2.substr(0, 2)) {
        cout << "Win: " << s << "\n";
        return;
    }
    else if (s.substr(0, 2) > s2.substr(0, 2)) {
        cout << "Win: " << s2 << "\n";
        return;
    }
    cout << "No one.\n";
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    // freopen("karu.in", "r", stdin);
    // freopen("karu.out", "w", stdout);

    ll t = 1;
    // cin >> t;
    while (t--) {
        mains();
    }
    return 0;
}