| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 705545 | rainboy | Dango Maker (JOI18_dango_maker) | C11 | 1 ms | 296 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define N 3000
#define M 3000
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 (j + 2 < m && cc[i][j] == 'R' && cc[i][j + 1] == 'G' && cc[i][j + 2] == 'W')
cc[i][j] = cc[i][j + 1] = cc[i][j + 2] = '-', k++;
else if (i + 2 < n && cc[i][j] == 'R' && cc[i + 1][j] == 'G' && cc[i + 2][j] == 'W')
cc[i][j] = cc[i + 1][j] = cc[i + 2][j] = '|', k++;
printf("%d\n", k);
return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
