QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#563843#9287. Double Eliminationzjy0001WA 0ms3924kbC++171.7kb2024-09-14 16:18:012024-09-14 16:18:01

Judging History

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

  • [2024-09-14 16:18:01]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3924kb
  • [2024-09-14 16:18:01]
  • 提交

answer

#include<bits/stdc++.h>
#define LL long long
#define LLL __int128
#define uint unsigned
#define ldb long double
#define uLL unsigned long long
using namespace std;
tuple<string,string>A[16];
signed main(){
    cin.tie(0)->sync_with_stdio(0);
    for(int i=0;i<16;++i){
        string s,t;cin>>s>>t;
        if(t.find('0')!=t.npos){
            if(t.find('0')==t.length()-1);
            else if(t[t.find('0')+1]=='1')
                t.erase(t.find('0'),2);
            else t[t.find('0')]='0'-1;
        }
        else t="2";
        // cout<<t<<endl;
        A[i]=make_tuple(t,s);
    }
    sort(A,A+16,greater<>());
    cout<<"1 "<<get<1>(A[0])<<'\n';
    cout<<"2 "<<get<1>(A[1])<<'\n';
    cout<<"3 "<<get<1>(A[2])<<'\n';
    cout<<"4 "<<get<1>(A[3])<<'\n';
    sort(A+4,A+6,[&](tuple<string,string>x,tuple<string,string>y){return get<1>(x)<get<1>(y);});
    cout<<"5-6 "<<get<1>(A[4])<<'\n';
    cout<<"5-6 "<<get<1>(A[5])<<'\n';
    sort(A+6,A+8,[&](tuple<string,string>x,tuple<string,string>y){return get<1>(x)<get<1>(y);});
    cout<<"7-8 "<<get<1>(A[6])<<'\n';
    cout<<"7-8 "<<get<1>(A[7])<<'\n';
    sort(A+8,A+12,[&](tuple<string,string>x,tuple<string,string>y){return get<1>(x)<get<1>(y);});
    cout<<"9-12 "<<get<1>(A[8])<<'\n';
    cout<<"9-12 "<<get<1>(A[9])<<'\n';
    cout<<"9-12 "<<get<1>(A[10])<<'\n';
    cout<<"9-12 "<<get<1>(A[11])<<'\n';
    sort(A+12,A+16,[&](tuple<string,string>x,tuple<string,string>y){return get<1>(x)<get<1>(y);});
    cout<<"13-16 "<<get<1>(A[12])<<'\n';
    cout<<"13-16 "<<get<1>(A[13])<<'\n';
    cout<<"13-16 "<<get<1>(A[14])<<'\n';
    cout<<"13-16 "<<get<1>(A[15])<<'\n';
    return 0;
}
/*
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3676kb

input:

escmraeett 11100
neigulsievse 010
noet 1010
nduymianegt 00
psimraiett 10111111
ustprriov 1100
yccnrieuwq 010
go 1010
agmiicnigv 10110
ctosaasetb 00
sugtacmiivnngi 11010
hpaenlte 00
lggsdp 11110
taincf 010
ainlclea 010
asmtaeert 00

output:

1 psimraiett
2 lggsdp
3 escmraeett
4 sugtacmiivnngi
5-6 agmiicnigv
5-6 ustprriov
7-8 go
7-8 noet
9-12 ainlclea
9-12 neigulsievse
9-12 taincf
9-12 yccnrieuwq
13-16 asmtaeert
13-16 ctosaasetb
13-16 hpaenlte
13-16 nduymianegt

result:

ok 32 tokens

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3924kb

input:

a 11100
b 01110
c 100
d 00
e 1101111
f 010
g 1010
h 00
i 11110
j 0110
k 100
l 00
m 1100
n 010
o 101110
p 00

output:

1 e
2 i
3 o
4 a
5-6 b
5-6 m
7-8 g
7-8 j
9-12 c
9-12 f
9-12 k
9-12 n
13-16 d
13-16 h
13-16 l
13-16 p

result:

wrong answer 6th words differ - expected: 'a', found: 'o'