QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#572009#9350. Fixing Bannersleo2005WA 68ms3860kbC++14935b2024-09-18 11:02:222024-09-18 11:02:23

Judging History

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

  • [2024-09-18 11:02:23]
  • 评测
  • 测评结果:WA
  • 用时:68ms
  • 内存:3860kb
  • [2024-09-18 11:02:22]
  • 提交

answer

#include<iostream>
#include<map>
#include<string>
using namespace std;
const int maxn=2e6+5;
int t;
int main(){
    cin>>t;
    while(t--){
    int temp[7]={};
      map<char,int>mp;
      for(int i=1;i<=6;i++){
        string s;
        cin>>s;
        for(int k=0;k<s.size();k++){
            if(s[k]=='h'||s[k]=='a'||s[k]=='r'||s[k]=='b'||s[k]=='i'||s[k]=='n'){
                mp[s[k]]++;
                temp[i]=1;
               
            }

        }
      }
      bool pre=1;
      if(mp['h']>=1&&mp['a']>=1&&mp['r']>=1&&mp['b']>=1&&mp['i']>=1&&mp['n']>=1){
          for(int i=1;i<=6;i++){
            if(temp[i]!=1){
                pre=0;
            }
          }
          if(pre==0){
            cout<<"No"<<endl;
          }else{
            cout<<"Yes"<<endl;
          }
          
      }else{
        cout<<"No"<<endl;
      }
      

    }
    




    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
welcome
toparticipate
inthe
ccpccontest
inharbin
inoctober
harvest
belong
ninja
reset
amazing
intriguing

output:

No
Yes

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 68ms
memory: 3580kb

input:

50000
dwwfplbjd
elulqfmsp
whobggs
kbnhtvzcs
zllux
ggye
vtnqpmvi
cgsplau
gkuwhhmrio
sp
q
utrefny
tvdcequdjj
klesyx
esovlmdy
x
nywu
gklfbqfb
ysnaswszfq
ouo
tq
r
auvi
copeabvz
nruvawao
cdv
vdsk
hboecpit
s
ewscbmb
jeqp
gel
u
htk
fcoigxbux
ylinyzut
bnhrvoetf
xa
ehnbce
keyk
efvzoyba
xan
tvnlm
tetpijfh
blq...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
N...

result:

wrong answer 86th lines differ - expected: 'No', found: 'Yes'