QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#478982#8516. LED MatrixPhantomThreshold#WA 0ms3836kbC++20918b2024-07-15 13:28:352024-07-15 13:28:35

Judging History

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

  • [2024-07-15 13:28:35]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3836kb
  • [2024-07-15 13:28:35]
  • 提交

answer

#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>
#define ll long long
#define int long long
using namespace std;
using namespace __gnu_pbds;

typedef tree< pair<int,int> , null_type,
			less< pair<int,int> >, splay_tree_tag,
			tree_order_statistics_node_update> PB;

const int maxn = 1010;

int R,C,K;
int ok1[maxn],ok2[maxn];

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	mt19937 mt( (unsigned long long)(new char) );
	
	cin>>R>>C>>K;
	for(int i=1;i<=R;i++)
	{
		string str; cin>>str;
		ok1[i]=1;
		for(int j=1;j<=C;j++)
		{
			if(str[j-1]=='-') ok1[i]=0;
		}
	}
	for(int i=1;i<=R;i++)
	{
		string str; cin>>str;
		for(int j=1;j<=K;j++)
		{
			if(str[j-1]=='*') ok2[i]=1;
		}
	}
	int ok=1;
	for(int i=1;i<=R;i++) if(!ok1[i]&&ok2[i]) ok=0;
	if(ok) cout<<"Y\n";
	else cout<<"N\n";
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3556kb

input:

6 6 6
****** --*---
****** -**---
****** ******
****** ******
****** -**---
*****- --*---

output:

N

result:

ok "N"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

2 4 6
**** ------
***- *-----

output:

N

result:

ok "N"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

2 6 4
****** ****
*-**-* ----

output:

Y

result:

ok "Y"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

1 1 1
* *

output:

Y

result:

ok "Y"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

1 1 1
* -

output:

Y

result:

ok "Y"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

1 1 1
- *

output:

N

result:

ok "N"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

1 1 1
- -

output:

Y

result:

ok "Y"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

28 120 84
*-***********-***********-***********-***********-***********-***********-***********-***********-***********-********** *------**----**------**----**------**----**------**----**------**----**------**----*
******-***********-***********-***********-***********-***********-***********-*****...

output:

N

result:

ok "N"

Test #9:

score: -100
Wrong Answer
time: 0ms
memory: 3616kb

input:

40 154 168
********************************************************************************************************************************************************** *----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**-...

output:

N

result:

wrong answer 1st words differ - expected: 'Y', found: 'N'