# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99023 | 2019-02-28T05:50:45 Z | 조승현(#2855, ainta) | Bitaro the Brave (JOI19_ho_t1) | C++17 | 320 ms | 46596 KB |
#include<cstdio> #include<algorithm> char p[3010][3010]; int w[3010][3010]; long long res; int n, m; int main() { int i, j; scanf("%d%d", &n, &m); for (i = 1; i <= n; i++) { scanf("%s", p[i] + 1); } for (i = 1; i <= n; i++) { int c = 0; for (j = m; j >= 1; j--) { if (p[i][j] == 'O')c++; if (p[i][j] == 'J')w[i][j] = c; } } for (i = 1; i <= m; i++) { int c = 0; for (j = n; j >= 1; j--) { if (p[j][i] == 'I')c++; if (p[j][i] == 'J')res += w[j][i] * c; } } printf("%lld\n", res); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 3 ms | 1024 KB | Output is correct |
6 | Correct | 3 ms | 1024 KB | Output is correct |
7 | Correct | 3 ms | 1024 KB | Output is correct |
8 | Correct | 0 ms | 1024 KB | Output is correct |
9 | Correct | 3 ms | 1024 KB | Output is correct |
10 | Correct | 2 ms | 1024 KB | Output is correct |
11 | Correct | 3 ms | 1024 KB | Output is correct |
12 | Correct | 3 ms | 1024 KB | Output is correct |
13 | Correct | 3 ms | 1024 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 3 ms | 1024 KB | Output is correct |
6 | Correct | 3 ms | 1024 KB | Output is correct |
7 | Correct | 3 ms | 1024 KB | Output is correct |
8 | Correct | 0 ms | 1024 KB | Output is correct |
9 | Correct | 3 ms | 1024 KB | Output is correct |
10 | Correct | 2 ms | 1024 KB | Output is correct |
11 | Correct | 3 ms | 1024 KB | Output is correct |
12 | Correct | 3 ms | 1024 KB | Output is correct |
13 | Correct | 3 ms | 1024 KB | Output is correct |
14 | Correct | 10 ms | 4736 KB | Output is correct |
15 | Correct | 4 ms | 3200 KB | Output is correct |
16 | Correct | 6 ms | 2560 KB | Output is correct |
17 | Correct | 3 ms | 384 KB | Output is correct |
18 | Correct | 11 ms | 4992 KB | Output is correct |
19 | Correct | 9 ms | 4480 KB | Output is correct |
20 | Correct | 9 ms | 4224 KB | Output is correct |
21 | Correct | 11 ms | 4992 KB | Output is correct |
22 | Correct | 8 ms | 4608 KB | Output is correct |
23 | Correct | 8 ms | 4224 KB | Output is correct |
24 | Correct | 12 ms | 5120 KB | Output is correct |
25 | Correct | 8 ms | 4480 KB | Output is correct |
26 | Correct | 7 ms | 4224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 3 ms | 1024 KB | Output is correct |
6 | Correct | 3 ms | 1024 KB | Output is correct |
7 | Correct | 3 ms | 1024 KB | Output is correct |
8 | Correct | 0 ms | 1024 KB | Output is correct |
9 | Correct | 3 ms | 1024 KB | Output is correct |
10 | Correct | 2 ms | 1024 KB | Output is correct |
11 | Correct | 3 ms | 1024 KB | Output is correct |
12 | Correct | 3 ms | 1024 KB | Output is correct |
13 | Correct | 3 ms | 1024 KB | Output is correct |
14 | Correct | 10 ms | 4736 KB | Output is correct |
15 | Correct | 4 ms | 3200 KB | Output is correct |
16 | Correct | 6 ms | 2560 KB | Output is correct |
17 | Correct | 3 ms | 384 KB | Output is correct |
18 | Correct | 11 ms | 4992 KB | Output is correct |
19 | Correct | 9 ms | 4480 KB | Output is correct |
20 | Correct | 9 ms | 4224 KB | Output is correct |
21 | Correct | 11 ms | 4992 KB | Output is correct |
22 | Correct | 8 ms | 4608 KB | Output is correct |
23 | Correct | 8 ms | 4224 KB | Output is correct |
24 | Correct | 12 ms | 5120 KB | Output is correct |
25 | Correct | 8 ms | 4480 KB | Output is correct |
26 | Correct | 7 ms | 4224 KB | Output is correct |
27 | Correct | 313 ms | 46596 KB | Output is correct |
28 | Correct | 17 ms | 15872 KB | Output is correct |
29 | Correct | 12 ms | 3456 KB | Output is correct |
30 | Correct | 3 ms | 512 KB | Output is correct |
31 | Correct | 224 ms | 39032 KB | Output is correct |
32 | Correct | 149 ms | 39160 KB | Output is correct |
33 | Correct | 170 ms | 34616 KB | Output is correct |
34 | Correct | 241 ms | 44920 KB | Output is correct |
35 | Correct | 203 ms | 41028 KB | Output is correct |
36 | Correct | 186 ms | 34680 KB | Output is correct |
37 | Correct | 320 ms | 46328 KB | Output is correct |
38 | Correct | 86 ms | 31736 KB | Output is correct |
39 | Correct | 120 ms | 27640 KB | Output is correct |