# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
706479 | 2023-03-06T17:09:17 Z | rainboy | Bitaro the Brave (JOI19_ho_t1) | C | 227 ms | 88340 KB |
#include <stdio.h> #define N 3000 #define M 3000 int main() { static char cc[N][M + 1]; static int kko[N][M], kki[N][M]; int n, m, i, j, k; long long ans; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) scanf("%s", cc[i]); for (i = 0; i < n; i++) for (j = m - 1, k = 0; j >= 0; j--) { if (cc[i][j] == 'O') k++; kko[i][j] = k; } for (j = 0; j < m; j++) for (i = n - 1, k = 0; i >= 0; i--) { if (cc[i][j] == 'I') k++; kki[i][j] = k; } ans = 0; for (i = 0; i < n; i++) for (j = 0; j < m; j++) if (cc[i][j] == 'J') ans += kko[i][j] * kki[i][j]; printf("%lld\n", ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 1448 KB | Output is correct |
6 | Correct | 1 ms | 1444 KB | Output is correct |
7 | Correct | 1 ms | 1364 KB | Output is correct |
8 | Correct | 1 ms | 1364 KB | Output is correct |
9 | Correct | 1 ms | 1444 KB | Output is correct |
10 | Correct | 1 ms | 1364 KB | Output is correct |
11 | Correct | 1 ms | 1456 KB | Output is correct |
12 | Correct | 1 ms | 1364 KB | Output is correct |
13 | Correct | 1 ms | 1364 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 1448 KB | Output is correct |
6 | Correct | 1 ms | 1444 KB | Output is correct |
7 | Correct | 1 ms | 1364 KB | Output is correct |
8 | Correct | 1 ms | 1364 KB | Output is correct |
9 | Correct | 1 ms | 1444 KB | Output is correct |
10 | Correct | 1 ms | 1364 KB | Output is correct |
11 | Correct | 1 ms | 1456 KB | Output is correct |
12 | Correct | 1 ms | 1364 KB | Output is correct |
13 | Correct | 1 ms | 1364 KB | Output is correct |
14 | Correct | 6 ms | 7380 KB | Output is correct |
15 | Correct | 2 ms | 4904 KB | Output is correct |
16 | Correct | 3 ms | 4268 KB | Output is correct |
17 | Correct | 1 ms | 420 KB | Output is correct |
18 | Correct | 6 ms | 7968 KB | Output is correct |
19 | Correct | 5 ms | 7856 KB | Output is correct |
20 | Correct | 5 ms | 7728 KB | Output is correct |
21 | Correct | 6 ms | 7892 KB | Output is correct |
22 | Correct | 6 ms | 7764 KB | Output is correct |
23 | Correct | 7 ms | 7764 KB | Output is correct |
24 | Correct | 6 ms | 7892 KB | Output is correct |
25 | Correct | 5 ms | 7864 KB | Output is correct |
26 | Correct | 6 ms | 7720 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 1448 KB | Output is correct |
6 | Correct | 1 ms | 1444 KB | Output is correct |
7 | Correct | 1 ms | 1364 KB | Output is correct |
8 | Correct | 1 ms | 1364 KB | Output is correct |
9 | Correct | 1 ms | 1444 KB | Output is correct |
10 | Correct | 1 ms | 1364 KB | Output is correct |
11 | Correct | 1 ms | 1456 KB | Output is correct |
12 | Correct | 1 ms | 1364 KB | Output is correct |
13 | Correct | 1 ms | 1364 KB | Output is correct |
14 | Correct | 6 ms | 7380 KB | Output is correct |
15 | Correct | 2 ms | 4904 KB | Output is correct |
16 | Correct | 3 ms | 4268 KB | Output is correct |
17 | Correct | 1 ms | 420 KB | Output is correct |
18 | Correct | 6 ms | 7968 KB | Output is correct |
19 | Correct | 5 ms | 7856 KB | Output is correct |
20 | Correct | 5 ms | 7728 KB | Output is correct |
21 | Correct | 6 ms | 7892 KB | Output is correct |
22 | Correct | 6 ms | 7764 KB | Output is correct |
23 | Correct | 7 ms | 7764 KB | Output is correct |
24 | Correct | 6 ms | 7892 KB | Output is correct |
25 | Correct | 5 ms | 7864 KB | Output is correct |
26 | Correct | 6 ms | 7720 KB | Output is correct |
27 | Correct | 227 ms | 87828 KB | Output is correct |
28 | Correct | 14 ms | 25940 KB | Output is correct |
29 | Correct | 8 ms | 7752 KB | Output is correct |
30 | Correct | 1 ms | 468 KB | Output is correct |
31 | Correct | 158 ms | 72360 KB | Output is correct |
32 | Correct | 204 ms | 88340 KB | Output is correct |
33 | Correct | 194 ms | 88024 KB | Output is correct |
34 | Correct | 184 ms | 84020 KB | Output is correct |
35 | Correct | 220 ms | 88164 KB | Output is correct |
36 | Correct | 190 ms | 87924 KB | Output is correct |
37 | Correct | 227 ms | 88316 KB | Output is correct |
38 | Correct | 146 ms | 72376 KB | Output is correct |
39 | Correct | 141 ms | 72100 KB | Output is correct |