QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#563837 | #9287. Double Elimination | zjy0001 | WA | 0ms | 3628kb | C++17 | 1.6kb | 2024-09-14 16:14:11 | 2024-09-14 16:14:12 |
Judging History
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&&t[t.find('0')+1]=='1')
t.erase(t.find('0'),2);
else t.erase(t.find('0'),1);
}
else t="";
// 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;
}
/*
*/
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
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 ustprriov 5-6 agmiicnigv 5-6 sugtacmiivnngi 7-8 go 7-8 noet 9-12 nduymianegt 9-12 neigulsievse 9-12 taincf 9-12 yccnrieuwq 13-16 ainlclea 13-16 asmtaeert 13-16 ctosaasetb 13-16 hpaenlte
result:
wrong answer 8th words differ - expected: 'sugtacmiivnngi', found: 'ustprriov'