QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#563799 | #9287. Double Elimination | zjy0001 | WA | 1ms | 3652kb | C++17 | 1.7kb | 2024-09-14 16:02:58 | 2024-09-14 16:02:58 |
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<int,int,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;
vector<int>a;
for(int j=0;j<t.length();++j)
if(t[j]=='0')a.emplace_back(j);
if(a.size()<2)a.emplace_back(t.length());
if(a.size()<2)a.emplace_back(t.length()+1);
if(a[0]+1==a[1])++a[1];
A[i]=make_tuple(a[1],a[0],s);
}
sort(A,A+16,greater<>());
cout<<"1 "<<get<2>(A[0])<<'\n';
cout<<"2 "<<get<2>(A[1])<<'\n';
cout<<"3 "<<get<2>(A[2])<<'\n';
cout<<"4 "<<get<2>(A[3])<<'\n';
sort(A+4,A+6,[&](tuple<int,int,string>x,tuple<int,int,string>y){return get<2>(x)<get<2>(y);});
cout<<"5-6 "<<get<2>(A[4])<<'\n';
cout<<"5-6 "<<get<2>(A[5])<<'\n';
sort(A+6,A+8,[&](tuple<int,int,string>x,tuple<int,int,string>y){return get<2>(x)<get<2>(y);});
cout<<"7-8 "<<get<2>(A[6])<<'\n';
cout<<"7-8 "<<get<2>(A[7])<<'\n';
sort(A+8,A+12,[&](tuple<int,int,string>x,tuple<int,int,string>y){return get<2>(x)<get<2>(y);});
cout<<"9-12 "<<get<2>(A[8])<<'\n';
cout<<"9-12 "<<get<2>(A[9])<<'\n';
cout<<"9-12 "<<get<2>(A[10])<<'\n';
cout<<"9-12 "<<get<2>(A[11])<<'\n';
sort(A+12,A+16,[&](tuple<int,int,string>x,tuple<int,int,string>y){return get<2>(x)<get<2>(y);});
cout<<"13-16 "<<get<2>(A[12])<<'\n';
cout<<"13-16 "<<get<2>(A[13])<<'\n';
cout<<"13-16 "<<get<2>(A[14])<<'\n';
cout<<"13-16 "<<get<2>(A[15])<<'\n';
return 0;
}
/*
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3652kb
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'