QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#595319 | #9350. Fixing Banners | miluosi | WA | 0ms | 3696kb | C++14 | 1.1kb | 2024-09-28 13:26:03 | 2024-09-28 13:26:04 |
Judging History
answer
#include<iostream>
#include<unordered_map>
#include<vector>
#include<algorithm>
#include<string>
#include<math.h>
#include<map>
#include<set>
#include<string.h>
#include<iomanip>
#include<queue>
using namespace std;
const int N = 200015;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
//int mod = 998244353;
//int a[N]{};
int f1[200005]{};
int f2[200005]{};
string ans = "harbin";
vector<string> s(7);
int ss[10][10]{};
int main()
{
int t;
cin >> t;
while (t--)
{
for (int i = 0; i <= 6; i++)
for (int j = 0; j <= 6; j++)
ss[i][j] = 0;
for (int i = 0; i < 6; i++)
{
cin >> s[i];
for (int k = 0; k < s[i].size(); k++)
{
for (int p = 0; p < 6; p++)
{
if (ans[p] == s[i][k]) ss[i][p] = 1;
}
}
}
int flag = 0;
int vis[7]{};
for (int i = 0; i < 6; i++)
for (int j = 0; j < 6; j++)
if (ss[j][i] == 1&&vis[j]==0)
{
vis[j] = 1;
flag++;
break;
}
if (flag == 6) cout << "YES" << endl;
else cout << "NO" << endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3696kb
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'