# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
77946 | 2018-10-01T10:20:28 Z | aquablitz11 | Dango Maker (JOI18_dango_maker) | C++14 | 2 ms | 784 KB |
#include <bits/stdc++.h> using namespace std; const int N = 3010; char S[N][N]; int main() { int n, m; scanf("%d%d", &n, &m); for (int i = 0; i < n; ++i) scanf(" %s", S[i]); int cnt = 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { if (S[i][j] == 'R' && S[i][j+1] == 'G' && S[i][j+2] == 'W') { ++cnt; S[i][j] = S[i][j+1] = S[i][j+2] = '\0'; } } } for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { if (S[i][j] == 'R' && S[i+1][j] == 'G' && S[i+2][j] == 'W') { ++cnt; S[i][j] = S[i+1][j] = S[i+2][j] = '\0'; } } } printf("%d\n", cnt); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 528 KB | Output is correct |
4 | Correct | 2 ms | 528 KB | Output is correct |
5 | Correct | 2 ms | 540 KB | Output is correct |
6 | Correct | 2 ms | 656 KB | Output is correct |
7 | Correct | 2 ms | 688 KB | Output is correct |
8 | Correct | 2 ms | 688 KB | Output is correct |
9 | Correct | 2 ms | 688 KB | Output is correct |
10 | Correct | 2 ms | 688 KB | Output is correct |
11 | Correct | 2 ms | 688 KB | Output is correct |
12 | Correct | 2 ms | 688 KB | Output is correct |
13 | Correct | 2 ms | 688 KB | Output is correct |
14 | Correct | 2 ms | 688 KB | Output is correct |
15 | Correct | 2 ms | 708 KB | Output is correct |
16 | Correct | 2 ms | 728 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 528 KB | Output is correct |
4 | Correct | 2 ms | 528 KB | Output is correct |
5 | Correct | 2 ms | 540 KB | Output is correct |
6 | Correct | 2 ms | 656 KB | Output is correct |
7 | Correct | 2 ms | 688 KB | Output is correct |
8 | Correct | 2 ms | 688 KB | Output is correct |
9 | Correct | 2 ms | 688 KB | Output is correct |
10 | Correct | 2 ms | 688 KB | Output is correct |
11 | Correct | 2 ms | 688 KB | Output is correct |
12 | Correct | 2 ms | 688 KB | Output is correct |
13 | Correct | 2 ms | 688 KB | Output is correct |
14 | Correct | 2 ms | 688 KB | Output is correct |
15 | Correct | 2 ms | 708 KB | Output is correct |
16 | Correct | 2 ms | 728 KB | Output is correct |
17 | Correct | 2 ms | 732 KB | Output is correct |
18 | Correct | 2 ms | 736 KB | Output is correct |
19 | Incorrect | 2 ms | 784 KB | Output isn't correct |
20 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 528 KB | Output is correct |
4 | Correct | 2 ms | 528 KB | Output is correct |
5 | Correct | 2 ms | 540 KB | Output is correct |
6 | Correct | 2 ms | 656 KB | Output is correct |
7 | Correct | 2 ms | 688 KB | Output is correct |
8 | Correct | 2 ms | 688 KB | Output is correct |
9 | Correct | 2 ms | 688 KB | Output is correct |
10 | Correct | 2 ms | 688 KB | Output is correct |
11 | Correct | 2 ms | 688 KB | Output is correct |
12 | Correct | 2 ms | 688 KB | Output is correct |
13 | Correct | 2 ms | 688 KB | Output is correct |
14 | Correct | 2 ms | 688 KB | Output is correct |
15 | Correct | 2 ms | 708 KB | Output is correct |
16 | Correct | 2 ms | 728 KB | Output is correct |
17 | Correct | 2 ms | 732 KB | Output is correct |
18 | Correct | 2 ms | 736 KB | Output is correct |
19 | Incorrect | 2 ms | 784 KB | Output isn't correct |
20 | Halted | 0 ms | 0 KB | - |