QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#577519 | #9350. Fixing Banners | plutos | WA | 888ms | 3740kb | C++17 | 880b | 2024-09-20 12:13:57 | 2024-09-20 12:13:58 |
Judging History
answer
#include <bits/stdc++.h>
void Yes() { std::cout << "Yes" << "\n"; return; }
void No() { std::cout << "No" << "\n"; return; }
template <typename T>
void out(T x) { std::cout << x << "\n"; }
using namespace std;
using ll=long long;
using PII=pair<int,int>;
const int N=2e5+10;
string s[6];
void Solve()
{
char a[6] = {'h','a','r','b','i','n'};
for(int i = 0;i<6;i++) {
cin >> s[i];
// cout<<s[i]<<"\n";
}
do{
int num = 0;
for(int i = 0 ; i < 6 ; i++ ) {
for(auto p:s[i])
if(p == a[i]) {num++;break;}
}
if(num == 6) {
Yes();
return;
}
}while(next_permutation(a,a+6));
No();
}
signed main()
{
// std::ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t=1;
cin>>t;
while(t--)
Solve();
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
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: 888ms
memory: 3660kb
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 No No No No No No No No No No No No No No No...
result:
wrong answer 910th lines differ - expected: 'Yes', found: 'No'