QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#645938#9350. Fixing BannersqkyWA 0ms3628kbC++171.2kb2024-10-16 20:31:372024-10-16 20:31:38

Judging History

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

  • [2024-10-16 20:31:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-10-16 20:31:37]
  • 提交

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;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3628kb

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'