QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#499807#8516. LED Matrix123adadWA 1ms7812kbC++14805b2024-07-31 19:24:502024-07-31 19:24:52

Judging History

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

  • [2024-07-31 19:24:52]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:7812kb
  • [2024-07-31 19:24:50]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int N=110;
int a[1010][1010],b[1010][1010];

void solve()
{
	int n,m,k;cin>>n>>m>>k;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			char x;cin>>x;
			if(x=='*') a[i][j]=1;
			else a[i][j]=0;
		}
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=k;j++)
		{
			char x;cin>>x;
			if(x=='*') b[i][j]=1;
			else b[i][j]=0;
		}
	}
	for(int i=1;i<=n;i++)
	{
		int flag1=0,flag2=0;
		for(int j=1;j<=m;j++)
		{
			if(a[i][j]==0) flag1=1;
		}
		for(int j=1;j<=k;j++)
		{
			if(b[i][j]) flag2=1;
		}
		if(flag1&&flag2)
		{
			cout<<"N";
			return;
		}

	}
	cout<<"Y";
}

int main()
{
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int _=1;//cin>>_;
	while(_--) solve();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 5628kb

input:

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

output:

N

result:

ok "N"

Test #2:

score: 0
Accepted
time: 1ms
memory: 5760kb

input:

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

output:

N

result:

ok "N"

Test #3:

score: 0
Accepted
time: 1ms
memory: 5760kb

input:

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

output:

Y

result:

ok "Y"

Test #4:

score: 0
Accepted
time: 1ms
memory: 5564kb

input:

1 1 1
* *

output:

Y

result:

ok "Y"

Test #5:

score: 0
Accepted
time: 1ms
memory: 5672kb

input:

1 1 1
* -

output:

Y

result:

ok "Y"

Test #6:

score: 0
Accepted
time: 1ms
memory: 5740kb

input:

1 1 1
- *

output:

N

result:

ok "N"

Test #7:

score: 0
Accepted
time: 1ms
memory: 5676kb

input:

1 1 1
- -

output:

Y

result:

ok "Y"

Test #8:

score: 0
Accepted
time: 1ms
memory: 5768kb

input:

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

output:

N

result:

ok "N"

Test #9:

score: -100
Wrong Answer
time: 1ms
memory: 7812kb

input:

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

output:

N

result:

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