QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#782601#9807. Make Them Believeccpy#WA 0ms3652kbC++20689b2024-11-25 20:37:052024-11-25 20:37:07

Judging History

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

  • [2024-11-25 20:37:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3652kb
  • [2024-11-25 20:37:05]
  • 提交

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'