QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#793158#9807. Make Them BelievefruianWA 0ms3616kbC++231.4kb2024-11-29 17:20:252024-11-29 17:20:27

Judging History

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

  • [2024-11-29 17:20:27]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-11-29 17:20:25]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define endl "\n" 
// #define int long long
#define sz(x) ((int)(x).size())
#define lowbit(x) ((x) & -(x))
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define rep(i,x,y) for(int i = x;i<y;i++)
#define reb(i,x,y) for(int i = x;i<=y;i++)
typedef long long ll;
typedef pair<int, int> pii;
typedef double db;
typedef long double ld;
const int N = 1e5+10, M = 2e7+10, mod = 1e6+7 , inf = 0x7fffffff;
const ld eps = 1e-12;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

struct Node{
    string name;
    int w = 0;
};

inline void solve() {
    vector<Node> v(8);
    Node a, b;
    for(int i = 0;i<8;i++){
        cin>>v[i].name>>v[i].w;
        if(i<4){
            if(a.w < v[i].w){
                a = v[i];
            }
        } else {
            if(b.w < v[i].w){
                b = v[i];
            }
        }
    }
    if(a.w > b.w){
        cout<<a.name<<" beates "<<b.name;
    } else {
        cout<<b.name<<" beates "<<a.name;
    }
}


signed main(){
    IOS;
    cout << fixed << setprecision(10);
    int __ = 1;
    // cin>>__;
    while(__--) solve();
    return 0;
}

详细

Test #1:

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

input:

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

output:

T1 beates BLG

result:

wrong answer 2nd words differ - expected: 'beats', found: 'beates'