QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#362665#8516. LED Matrixucup-team135#RE 0ms3872kbC++20943b2024-03-23 16:34:542024-03-23 16:34:55

Judging History

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

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

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][0]=='*');}
        }
    }
    cout<<(ok ? "Y" : "N");
    return 0;
}

详细

Test #1:

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

input:

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

output:

N

result:

ok "N"

Test #2:

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

input:

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

output:

N

result:

ok "N"

Test #3:

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

input:

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

output:

Y

result:

ok "Y"

Test #4:

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

input:

1 1 1
* *

output:

Y

result:

ok "Y"

Test #5:

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

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

input:

1 1 1
- -

output:

Y

result:

ok "Y"

Test #8:

score: -100
Runtime Error

input:

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

output:


result: