QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#782601 | #9807. Make Them Believe | ccpy# | WA | 0ms | 3652kb | C++20 | 689b | 2024-11-25 20:37:05 | 2024-11-25 20:37:07 |
Judging History
answer
#include<bits/stdc++.h>
#define MAX 10
using namespace std;
string s[MAX];
int a[MAX];
#define pii pair<int,int>
#define fi first
#define se second
pii sol(int l,int r){
if(l==r) return {l,0};
int mid=(l+r)>>1;
pii x=sol(l,mid),y=sol(mid+1,r);
if(a[x.fi]>a[y.fi]) return {x.fi,y.fi};
return {y.fi,x.fi};
}
void sol(){
for(int i=0;i<8;i++){
cin>>s[i]>>a[i];
//cout<<s[i]<<" "<<a[i]<<endl;
}
pii up=sol(0,7);
cout<<s[up.fi]<<" beat "<<s[up.se]<<"\n";
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
while(t--) sol();
}
// g++ a.cpp -Wl,--stack=10000000 -o a && a < in.txt > out.txt
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3652kb
input:
LNG 55 WBG 65 HLE 70 BLG 75 TES 48 T1 80 GEN 60 FLY 50
output:
T1 beat BLG
result:
wrong answer 2nd words differ - expected: 'beats', found: 'beat'