QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#562140 | #8516. LED Matrix | ucup-team3519# | WA | 0ms | 3560kb | C++20 | 562b | 2024-09-13 15:17:44 | 2024-09-13 15:17:48 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int INF = 2e9 + 10;
int solve(){
int n,m,k;
cin>>n>>m>>k;
for(int i=0;i<n;i++){
string s,t;
cin>>s>>t;
int cnt0=0,cnt1=0;
for(int j=0;j<s.length();j++){
if(s[j]=='-')cnt0=1;
}
for(int j=0;j<t.length();j++){
if(s[j]=='*')cnt1=1;
}
if(cnt0&&cnt1)return 0;
}
return 1;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
if(solve())cout<<"Y";
else cout<<"N";
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3560kb
input:
6 6 6 ****** --*--- ****** -**--- ****** ****** ****** ****** ****** -**--- *****- --*---
output:
N
result:
ok "N"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
2 4 6 **** ------ ***- *-----
output:
N
result:
ok "N"
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3556kb
input:
2 6 4 ****** **** *-**-* ----
output:
N
result:
wrong answer 1st words differ - expected: 'Y', found: 'N'