QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#793158 | #9807. Make Them Believe | fruian | WA | 0ms | 3616kb | C++23 | 1.4kb | 2024-11-29 17:20:25 | 2024-11-29 17:20:27 |
Judging History
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'