QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#573078#9350. Fixing BannerswhyhereWA 0ms3576kbC++17881b2024-09-18 17:15:572024-09-18 17:15:57

Judging History

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

  • [2024-09-18 17:15:57]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3576kb
  • [2024-09-18 17:15:57]
  • 提交

answer

#include <bits/stdc++.h>
#define ll long long
using namespace std;

void Z()
{
    vector<string> a(6);
    string s = "harbin";
    for (int i = 0; i < 6; i++)
    {
        cin >> a[i];
    }
    bool flag = 0;
    do
    {
        int cnt = 0;
        for (int i = 0; i < 6; i++)
        {
            for (int j = 0; j < a[i].size(); j++)
            {
                if (a[i][j] == s[i])
                {
                    cnt++;
                    break;
                }
            }
        }
        if (cnt == 6)
        {
            cout << "YES\n";
            return;
        }
    } while (next_permutation(a.begin(), a.end()));
   
    cout << "NO\n";
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
    cin >> t;
    while (t--)
    {
        Z();
    }
    return 0;
}

详细

Test #1:

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

input:

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

output:

NO
YES

result:

wrong answer 1st lines differ - expected: 'No', found: 'NO'