QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#595325 | #9350. Fixing Banners | miluosi | WA | 61ms | 3704kb | C++14 | 1.1kb | 2024-09-28 13:26:59 | 2024-09-28 13:26:59 |
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: 100
Accepted
time: 0ms
memory: 3636kb
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: 61ms
memory: 3704kb
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 216th lines differ - expected: 'Yes', found: 'No'