QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#645948 | #9350. Fixing Banners | qky | WA | 0ms | 3852kb | C++17 | 1.2kb | 2024-10-16 20:34:29 | 2024-10-16 20:34:30 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int t;
cin >> t;
while (t--) {
int s[7][7];
for(int i=1;i<=6;i++){
string t;cin>>t;
for(int j=0;j<t.size();j++){
char c=t[j];
if(c=='h')s[i][1]=1;
if(c=='a')s[i][2]=1;
if(c=='r')s[i][3]=1;
if(c=='b')s[i][4]=1;
if(c=='i')s[i][5]=1;
if(c=='n')s[i][6]=1;
}
}
int a[7],b[7];
for(int i=1;i<=6;i++){
for(int j=1;j<=6;j++){
if(s[i][j]==1){
a[i]++;
}
if(s[j][i]==1){
b[i]++;
}
}
}
int judge=1;
for(int i=1;i<=6;i++){
if(a[i]==0||b[i]==0){
judge=0;
break;
}
}
if(judge==1){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3852kb
input:
2 welcome toparticipate inthe ccpccontest inharbin inoctober harvest belong ninja reset amazing intriguing
output:
Yes Yes
result:
wrong answer 1st lines differ - expected: 'No', found: 'Yes'