# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
481414 | 2021-10-20T17:58:24 Z | rainboy | Emacs (COCI20_emacs) | C | 1 ms | 292 KB |
#include <stdio.h> #define N 100 #define M 100 int main() { static char cc[N][M + 1]; int n, m, i, j, k; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) scanf("%s", cc[i]); k = 0; for (i = 0; i < n; i++) for (j = 0; j < m; j++) if (cc[i][j] == '*' && (i == 0 || cc[i - 1][j] == '.') && (j == 0 || cc[i][j - 1] == '.')) k++; printf("%d\n", k); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 260 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 292 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 204 KB | Output is correct |
9 | Correct | 0 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |