QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#782554 | #9807. Make Them Believe | SocialPanda | WA | 0ms | 3856kb | C++23 | 1.1kb | 2024-11-25 20:27:51 | 2024-11-25 20:27:52 |
Judging History
answer
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#define int long long
//#define LL long long
#define double long double
//#define lf Lf
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define endl "\n"
#define PII pair<int,int>
#define Gheap priority_queue<int,vector<int>,greater<int>>
#define Lheap priority_queue<int>
#define MAXN 0x3f3f3f3f
#define MINN -0x3f3f3f3f
using namespace std;
const int N=1e4+100,C=2*N;
//int e[N],w[M],h[M],ne[M],idx;
void solve()
{
int base=-1;
int sc=-1;
string ans;
string ya;
for(int i=1;i<=8;i++)
{
string s;
int val;
cin>>s>>val;
if(base<val)
{
sc=base;
ya=ans;
base=val;
ans=s;
}
else
{
if(sc<val)
{
sc=val;
ya=s;
}
}
}
cout<<ans<<" beats "<<ya<<endl;
}
/*
5 23
10 80
5 50
2 10
7 35
4 24
*/
int main()
{
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int tt=1;
//cin >> tt;
while(tt--) solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3556kb
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: 3548kb
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: 3856kb
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'