QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#572009 | #9350. Fixing Banners | leo2005 | WA | 68ms | 3860kb | C++14 | 935b | 2024-09-18 11:02:22 | 2024-09-18 11:02:23 |
Judging History
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'