diff --git a/ZOJ/3944_csdn.cpp b/ZOJ/3944_csdn.cpp new file mode 100644 index 0000000..7a7d10c --- /dev/null +++ b/ZOJ/3944_csdn.cpp @@ -0,0 +1,22 @@ +#include +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; +}