QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#361803 | #8516. LED Matrix | ucup-team2303# | WA | 0ms | 4080kb | C++17 | 1.1kb | 2024-03-23 13:17:33 | 2024-03-23 13:17:34 |
Judging History
answer
// #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define PB emplace_back
#define int long long
#define ll long long
#define vi vector<int>
#define siz(a) ((int) ((a).size()))
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
void print(vi n) { rep(i, 0, siz(n) - 1) cerr << n[i] << " \n"[i == siz(n) - 1]; }
int a, b, c;
char s[1005][1005], t[1005][1005];
signed main() {
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> a >> b >> c;
rep(i, 1, a) cin >> s[i] + 1;
rep(i, 1, a) cin >> t[i] + 1;
bool ans = 1;
rep(i, 1, a) {
bool p = 1, q = 0;
rep(j, 1, b) p &= s[i][j] == '*';
rep(j, 1, c) q |= t[i][j] == '*';
ans &= p >= q;
}
ans ? cout << "Y" : cout << "N";
return cerr << endl << 1.0 * clock() / CLOCKS_PER_SEC << endl, 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 4016kb
input:
6 6 6 ****** --*--- ****** -**--- ****** ****** ****** ****** ****** -**--- *****- --*---
output:
N
result:
ok "N"
Test #2:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
2 4 6 **** ------ ***- *-----
output:
N
result:
ok "N"
Test #3:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
2 6 4 ****** **** *-**-* ----
output:
Y
result:
ok "Y"
Test #4:
score: 0
Accepted
time: 0ms
memory: 4016kb
input:
1 1 1 * *
output:
Y
result:
ok "Y"
Test #5:
score: 0
Accepted
time: 0ms
memory: 4016kb
input:
1 1 1 * -
output:
Y
result:
ok "Y"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3992kb
input:
1 1 1 - *
output:
N
result:
ok "N"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
1 1 1 - -
output:
Y
result:
ok "Y"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3988kb
input:
28 120 84 *-***********-***********-***********-***********-***********-***********-***********-***********-***********-********** *------**----**------**----**------**----**------**----**------**----**------**----* ******-***********-***********-***********-***********-***********-***********-*****...
output:
N
result:
ok "N"
Test #9:
score: -100
Wrong Answer
time: 0ms
memory: 4080kb
input:
40 154 168 ********************************************************************************************************************************************************** *----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**----**-...
output:
N
result:
wrong answer 1st words differ - expected: 'Y', found: 'N'