QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#595319#9350. Fixing BannersmiluosiWA 0ms3696kbC++141.1kb2024-09-28 13:26:032024-09-28 13:26:04

Judging History

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

  • [2024-09-28 13:26:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3696kb
  • [2024-09-28 13:26:03]
  • 提交

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

}

详细

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'