QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#362663#8516. LED Matrixucup-team135#RE 0ms3864kbC++20943b2024-03-23 16:34:002024-03-23 16:34:02

Judging History

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

  • [2024-03-23 16:34:02]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3864kb
  • [2024-03-23 16:34:00]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
#define int long long
#define app push_back
#define all(x) (x).begin(),(x).end()
#ifdef LOCAL
#define debug(...) [](auto...a){ ((cout << a << ' '), ...) << endl;}(#__VA_ARGS__, ":", __VA_ARGS__)
#else
#define debug(...)
#endif
#ifdef LOCAL
#define __int128 long long
#endif // LOCAL
const int inf=1e18;
int32_t main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int n,m,m2;cin>>n>>m>>m2;
    string s1[n];for(int i=0;i<n;++i) {cin>>s1[i];}
    string s2[n];for(int i=0;i<n;++i) {cin>>s2[i];}
    for(int i=0;i<n;++i)
    {
        for(int j=m-2;j>=0;--j)
        {
            if(s1[i][j+1]=='-') {s1[i][j]='-';}
        }
    }
    bool ok=1;
    for(int i=0;i<n;++i)
    {
        for(int j=0;j<m2;++j)
        {
            if(s2[i][j]=='*') {ok=(ok &&  s1[i][j]=='*');}
        }
    }
    cout<<(ok ? "Y" : "N");
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

N

result:

ok "N"

Test #2:

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

input:

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

output:

N

result:

ok "N"

Test #3:

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

input:

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

output:

Y

result:

ok "Y"

Test #4:

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

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: 3576kb

input:

1 1 1
- *

output:

N

result:

ok "N"

Test #7:

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

input:

1 1 1
- -

output:

Y

result:

ok "Y"

Test #8:

score: -100
Runtime Error

input:

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

output:


result: