QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#784120#9807. Make Them BelieveF9O1#WA 0ms3672kbC++201.3kb2024-11-26 13:34:492024-11-26 13:34:50

Judging History

你现在查看的是最新测评结果

  • [2024-11-26 13:34:50]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3672kb
  • [2024-11-26 13:34:49]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef long double ld;
#define endl '\n'
#define pii pair<int, int>
#define cerr                                                                                                           \
if (test) cerr
#define freopen                                                                                                        \
if (test) freopen
#define whtest if (test)
const int test = 0;
const int N = 2e3 + 10;
const int mod = 998244353;
const int inf = 0x3f3f3f3f3f;
const ll inff = 1ll << 60;
inline int read() {
    int x;
    cin >> x;
    return x;
}
static mt19937_64 sj(chrono::steady_clock::now().time_since_epoch().count());
void solve() {
    int n=8;
    vector<pair<string,int>>a(n);
    for(int i=0;i<n;i++) {
        cin>>a[i].first>>a[i].second;
    }
    sort(a.begin(), a.end(),[&](pair<string,int>a1,pair<string,int>a2) {
        return a2.second<a1.second;
    });
    cout<<a[0].first<<" beats "<<a[1].first<<endl;
}


signed main() {
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    int t = 1;
    //t = read();
    for (int i = 1; i <= t; ++i) {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 3672kb

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: 3532kb

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'