# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
950847 | 2024-03-20T19:33:54 Z | ace5 | Dango Maker (JOI18_dango_maker) | C++17 | 81 ms | 26916 KB |
#include <cstdio> char a[3001][3001]; bool u[3001][3001]; int ans = 0; int main(){ int n,m; scanf("%d%d",&n,&m); for(int i = 0;i < n;++i) scanf("%s",a[i]); for(int i = 0;i < n;++i){ for(int j = 0;j < m;++j){ if(a[i][j] != 'R')continue; if(j < m-2 && a[i][j+1] == 'G' && a[i][j+2] == 'W' && !(u[i][j+1]+u[i][j+2])) ans++; else if(i < n-2 && a[i+1][j] == 'G' && a[i+2][j] == 'W'){ if(j > 0 && j < m-1 && a[i+1][j-1] == 'R' && a[i+1][j+1] == 'W' && !u[i+1][j+1]) u[i+1][j]=1; else u[i+2][j]=1; ans++; } } } printf("%d",ans); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2392 KB | Output is correct |
2 | Correct | 0 ms | 2484 KB | Output is correct |
3 | Correct | 0 ms | 2396 KB | Output is correct |
4 | Correct | 0 ms | 2396 KB | Output is correct |
5 | Correct | 0 ms | 2396 KB | Output is correct |
6 | Correct | 0 ms | 2396 KB | Output is correct |
7 | Correct | 0 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2396 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2392 KB | Output is correct |
11 | Correct | 1 ms | 2648 KB | Output is correct |
12 | Correct | 0 ms | 2648 KB | Output is correct |
13 | Correct | 0 ms | 2396 KB | Output is correct |
14 | Correct | 1 ms | 2396 KB | Output is correct |
15 | Correct | 1 ms | 2396 KB | Output is correct |
16 | Correct | 0 ms | 2396 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2392 KB | Output is correct |
2 | Correct | 0 ms | 2484 KB | Output is correct |
3 | Correct | 0 ms | 2396 KB | Output is correct |
4 | Correct | 0 ms | 2396 KB | Output is correct |
5 | Correct | 0 ms | 2396 KB | Output is correct |
6 | Correct | 0 ms | 2396 KB | Output is correct |
7 | Correct | 0 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2396 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2392 KB | Output is correct |
11 | Correct | 1 ms | 2648 KB | Output is correct |
12 | Correct | 0 ms | 2648 KB | Output is correct |
13 | Correct | 0 ms | 2396 KB | Output is correct |
14 | Correct | 1 ms | 2396 KB | Output is correct |
15 | Correct | 1 ms | 2396 KB | Output is correct |
16 | Correct | 0 ms | 2396 KB | Output is correct |
17 | Correct | 0 ms | 2396 KB | Output is correct |
18 | Correct | 1 ms | 2396 KB | Output is correct |
19 | Correct | 0 ms | 2396 KB | Output is correct |
20 | Correct | 1 ms | 2396 KB | Output is correct |
21 | Correct | 1 ms | 2396 KB | Output is correct |
22 | Correct | 0 ms | 2396 KB | Output is correct |
23 | Correct | 0 ms | 2396 KB | Output is correct |
24 | Correct | 1 ms | 2396 KB | Output is correct |
25 | Correct | 0 ms | 2396 KB | Output is correct |
26 | Correct | 1 ms | 2396 KB | Output is correct |
27 | Correct | 1 ms | 2392 KB | Output is correct |
28 | Correct | 1 ms | 2396 KB | Output is correct |
29 | Correct | 1 ms | 2396 KB | Output is correct |
30 | Correct | 1 ms | 2396 KB | Output is correct |
31 | Correct | 1 ms | 2660 KB | Output is correct |
32 | Correct | 0 ms | 2396 KB | Output is correct |
33 | Correct | 1 ms | 2392 KB | Output is correct |
34 | Correct | 0 ms | 2396 KB | Output is correct |
35 | Correct | 1 ms | 2396 KB | Output is correct |
36 | Correct | 1 ms | 2408 KB | Output is correct |
37 | Correct | 0 ms | 2396 KB | Output is correct |
38 | Correct | 1 ms | 2396 KB | Output is correct |
39 | Correct | 0 ms | 2396 KB | Output is correct |
40 | Correct | 1 ms | 2392 KB | Output is correct |
41 | Correct | 1 ms | 2392 KB | Output is correct |
42 | Correct | 1 ms | 2396 KB | Output is correct |
43 | Correct | 1 ms | 2396 KB | Output is correct |
44 | Correct | 0 ms | 2400 KB | Output is correct |
45 | Correct | 0 ms | 2396 KB | Output is correct |
46 | Correct | 0 ms | 2400 KB | Output is correct |
47 | Correct | 1 ms | 2400 KB | Output is correct |
48 | Correct | 0 ms | 2396 KB | Output is correct |
49 | Correct | 0 ms | 2652 KB | Output is correct |
50 | Correct | 0 ms | 2400 KB | Output is correct |
51 | Correct | 1 ms | 2400 KB | Output is correct |
52 | Correct | 1 ms | 2396 KB | Output is correct |
53 | Correct | 0 ms | 2396 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2392 KB | Output is correct |
2 | Correct | 0 ms | 2484 KB | Output is correct |
3 | Correct | 0 ms | 2396 KB | Output is correct |
4 | Correct | 0 ms | 2396 KB | Output is correct |
5 | Correct | 0 ms | 2396 KB | Output is correct |
6 | Correct | 0 ms | 2396 KB | Output is correct |
7 | Correct | 0 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2396 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2392 KB | Output is correct |
11 | Correct | 1 ms | 2648 KB | Output is correct |
12 | Correct | 0 ms | 2648 KB | Output is correct |
13 | Correct | 0 ms | 2396 KB | Output is correct |
14 | Correct | 1 ms | 2396 KB | Output is correct |
15 | Correct | 1 ms | 2396 KB | Output is correct |
16 | Correct | 0 ms | 2396 KB | Output is correct |
17 | Correct | 0 ms | 2396 KB | Output is correct |
18 | Correct | 1 ms | 2396 KB | Output is correct |
19 | Correct | 0 ms | 2396 KB | Output is correct |
20 | Correct | 1 ms | 2396 KB | Output is correct |
21 | Correct | 1 ms | 2396 KB | Output is correct |
22 | Correct | 0 ms | 2396 KB | Output is correct |
23 | Correct | 0 ms | 2396 KB | Output is correct |
24 | Correct | 1 ms | 2396 KB | Output is correct |
25 | Correct | 0 ms | 2396 KB | Output is correct |
26 | Correct | 1 ms | 2396 KB | Output is correct |
27 | Correct | 1 ms | 2392 KB | Output is correct |
28 | Correct | 1 ms | 2396 KB | Output is correct |
29 | Correct | 1 ms | 2396 KB | Output is correct |
30 | Correct | 1 ms | 2396 KB | Output is correct |
31 | Correct | 1 ms | 2660 KB | Output is correct |
32 | Correct | 0 ms | 2396 KB | Output is correct |
33 | Correct | 1 ms | 2392 KB | Output is correct |
34 | Correct | 0 ms | 2396 KB | Output is correct |
35 | Correct | 1 ms | 2396 KB | Output is correct |
36 | Correct | 1 ms | 2408 KB | Output is correct |
37 | Correct | 0 ms | 2396 KB | Output is correct |
38 | Correct | 1 ms | 2396 KB | Output is correct |
39 | Correct | 0 ms | 2396 KB | Output is correct |
40 | Correct | 1 ms | 2392 KB | Output is correct |
41 | Correct | 1 ms | 2392 KB | Output is correct |
42 | Correct | 1 ms | 2396 KB | Output is correct |
43 | Correct | 1 ms | 2396 KB | Output is correct |
44 | Correct | 0 ms | 2400 KB | Output is correct |
45 | Correct | 0 ms | 2396 KB | Output is correct |
46 | Correct | 0 ms | 2400 KB | Output is correct |
47 | Correct | 1 ms | 2400 KB | Output is correct |
48 | Correct | 0 ms | 2396 KB | Output is correct |
49 | Correct | 0 ms | 2652 KB | Output is correct |
50 | Correct | 0 ms | 2400 KB | Output is correct |
51 | Correct | 1 ms | 2400 KB | Output is correct |
52 | Correct | 1 ms | 2396 KB | Output is correct |
53 | Correct | 0 ms | 2396 KB | Output is correct |
54 | Correct | 0 ms | 2396 KB | Output is correct |
55 | Correct | 2 ms | 16736 KB | Output is correct |
56 | Correct | 1 ms | 2400 KB | Output is correct |
57 | Correct | 2 ms | 15452 KB | Output is correct |
58 | Correct | 11 ms | 10588 KB | Output is correct |
59 | Correct | 77 ms | 26808 KB | Output is correct |
60 | Correct | 77 ms | 26916 KB | Output is correct |
61 | Correct | 81 ms | 26764 KB | Output is correct |
62 | Correct | 1 ms | 2396 KB | Output is correct |
63 | Correct | 78 ms | 26516 KB | Output is correct |
64 | Correct | 44 ms | 26644 KB | Output is correct |
65 | Correct | 41 ms | 26776 KB | Output is correct |
66 | Correct | 47 ms | 26804 KB | Output is correct |
67 | Correct | 48 ms | 26560 KB | Output is correct |
68 | Correct | 38 ms | 26516 KB | Output is correct |
69 | Correct | 42 ms | 26648 KB | Output is correct |
70 | Correct | 6 ms | 10588 KB | Output is correct |
71 | Correct | 8 ms | 10584 KB | Output is correct |
72 | Correct | 6 ms | 10588 KB | Output is correct |
73 | Correct | 6 ms | 10524 KB | Output is correct |
74 | Correct | 6 ms | 10588 KB | Output is correct |
75 | Correct | 6 ms | 10584 KB | Output is correct |
76 | Correct | 6 ms | 10584 KB | Output is correct |
77 | Correct | 6 ms | 10588 KB | Output is correct |
78 | Correct | 6 ms | 10588 KB | Output is correct |
79 | Correct | 7 ms | 10588 KB | Output is correct |
80 | Correct | 7 ms | 10588 KB | Output is correct |
81 | Correct | 6 ms | 10588 KB | Output is correct |
82 | Correct | 6 ms | 10588 KB | Output is correct |
83 | Correct | 7 ms | 10532 KB | Output is correct |
84 | Correct | 6 ms | 10588 KB | Output is correct |
85 | Correct | 6 ms | 10588 KB | Output is correct |
86 | Correct | 7 ms | 10528 KB | Output is correct |
87 | Correct | 7 ms | 10588 KB | Output is correct |
88 | Correct | 7 ms | 10680 KB | Output is correct |
89 | Correct | 7 ms | 10588 KB | Output is correct |
90 | Correct | 7 ms | 10520 KB | Output is correct |