mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
This commit is contained in:
parent
a4130565bb
commit
d986fc07ef
22
ZOJ/3944_csdn.cpp
Normal file
22
ZOJ/3944_csdn.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
const int MAXN = 200;
|
||||
char s[MAXN][MAXN];
|
||||
|
||||
int main() {
|
||||
int T; scanf("%d", &T);
|
||||
for (int cas = 1; cas <= T; ++cas) {
|
||||
int n, m; scanf("%d%d", &n, &m);
|
||||
memset(s, 0, sizeof(s));
|
||||
for (int i = 0; i < n; ++i) scanf("%s", s[i + 10] + 10);
|
||||
int ret = 0;
|
||||
for (int i = 0; i < n + 10; ++i) {
|
||||
for (int j = 0; j < m + 10; ++j) {
|
||||
ret += s[i][j + 1] == 'O' || s[i + 1][j] == '/' || s[i + 1][j + 1] == '|' ||
|
||||
s[i + 1][j + 2] == '\\' || s[i + 2][j] == '(' || s[i + 2][j + 2] == ')';
|
||||
}
|
||||
}
|
||||
cout << ret << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user