QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#791144#9807. Make Them Believeoyasumi_sion#WA 0ms3616kbC++20585b2024-11-28 17:06:422024-11-28 17:06:46

Judging History

This is the latest submission verdict.

  • [2024-11-28 17:06:46]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3616kb
  • [2024-11-28 17:06:42]
  • Submitted

answer

#include <bits/stdc++.h>

using i64 = long long;
using namespace std;

struct Node{
    string name;
    int bh;
};

void solve() {
    vector<Node> v(8);
    for(int i = 0;i<8;i++){
        cin>>v[i].name>>v[i].bh;
    }
    sort(v.begin(), v.end(), [&](const Node& a, const Node& b){
        return a.bh > b.bh;
    });

    cout<<v[0].name<<" beats " << v[1].name<<endl;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    int t = 1;
    // std::cin >> t;

    while (t--) {
        solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3596kb

input:

LNG 55
WBG 65
HLE 70
BLG 75
TES 48
T1 80
GEN 60
FLY 50

output:

T1 beats BLG

result:

ok 3 tokens

Test #2:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

LNG 55
WBG 65
HLE 70
BLG 81
TES 48
T1 80
GEN 60
FLY 50

output:

BLG beats T1

result:

ok 3 tokens

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3616kb

input:

P6 73
4 22
UN 84
Q 55
J 68
QR8 18
W 27
9J7 1

output:

UN beats P6

result:

wrong answer 3rd words differ - expected: 'J', found: 'P6'