QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#362663 | #8516. LED Matrix | ucup-team135# | RE | 0ms | 3864kb | C++20 | 943b | 2024-03-23 16:34:00 | 2024-03-23 16:34:02 |
Judging History
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 *-***********-***********-***********-***********-***********-***********-***********-***********-***********-********** *------**----**------**----**------**----**------**----**------**----**------**----* ******-***********-***********-***********-***********-***********-***********-*****...