QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#785591 | #9807. Make Them Believe | Bicycle_23# | WA | 0ms | 3820kb | C++20 | 588b | 2024-11-26 18:25:13 | 2024-11-26 18:25:14 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
const int N=1e6+10;
typedef pair<int,string>pii;
int n;
vector<pii>a;
void solve() {
for(int i=0;i<8;i++) {
string name;
int sc;
cin>>name>>sc;
a.emplace_back(sc,name);
}
sort(a.begin(),a.end());
reverse(a.begin(),a.end());
cout<<a[0].second<<" beats "<<a[1].second<<endl;
}
signed main()
{
cin.tie(0); cout.tie(0);
ios::sync_with_stdio(0);
int _ = 1;
// cin >> _;
while (_--) solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3820kb
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: 3600kb
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: 3500kb
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'