# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99002 | 2019-02-28T05:08:20 Z | 크리(#2856, kriii) | Bitaro the Brave (JOI19_ho_t1) | C++17 | 155 ms | 80580 KB |
#include <stdio.h> int H,W; char S[3030][3030]; int A[3030][3030],B[3030][3030]; int main() { scanf ("%d %d",&H,&W); for (int i=0;i<H;i++) scanf ("%s",S[i]); long long ans = 0; for (int i=H-1;i>=0;i--) for (int j=W-1;j>=0;j--){ A[i][j] = A[i+1][j]; B[i][j] = B[i][j+1]; if (S[i][j] == 'I') A[i][j]++; if (S[i][j] == 'O') B[i][j]++; if (S[i][j] == 'J') ans += (long long) A[i][j] * B[i][j]; } printf ("%lld\n",ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 408 KB | Output is correct |
2 | Correct | 2 ms | 256 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 | 1536 KB | Output is correct |
6 | Correct | 12 ms | 1408 KB | Output is correct |
7 | Correct | 3 ms | 1340 KB | Output is correct |
8 | Correct | 4 ms | 1516 KB | Output is correct |
9 | Correct | 3 ms | 1408 KB | Output is correct |
10 | Correct | 3 ms | 1408 KB | Output is correct |
11 | Correct | 4 ms | 1580 KB | Output is correct |
12 | Correct | 3 ms | 1408 KB | Output is correct |
13 | Correct | 3 ms | 1408 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 408 KB | Output is correct |
2 | Correct | 2 ms | 256 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 | 1536 KB | Output is correct |
6 | Correct | 12 ms | 1408 KB | Output is correct |
7 | Correct | 3 ms | 1340 KB | Output is correct |
8 | Correct | 4 ms | 1516 KB | Output is correct |
9 | Correct | 3 ms | 1408 KB | Output is correct |
10 | Correct | 3 ms | 1408 KB | Output is correct |
11 | Correct | 4 ms | 1580 KB | Output is correct |
12 | Correct | 3 ms | 1408 KB | Output is correct |
13 | Correct | 3 ms | 1408 KB | Output is correct |
14 | Correct | 11 ms | 7424 KB | Output is correct |
15 | Correct | 7 ms | 4992 KB | Output is correct |
16 | Correct | 6 ms | 4224 KB | Output is correct |
17 | Correct | 2 ms | 384 KB | Output is correct |
18 | Correct | 12 ms | 7808 KB | Output is correct |
19 | Correct | 10 ms | 7808 KB | Output is correct |
20 | Correct | 12 ms | 7808 KB | Output is correct |
21 | Correct | 11 ms | 7912 KB | Output is correct |
22 | Correct | 12 ms | 7740 KB | Output is correct |
23 | Correct | 10 ms | 7680 KB | Output is correct |
24 | Correct | 12 ms | 7808 KB | Output is correct |
25 | Correct | 10 ms | 7808 KB | Output is correct |
26 | Correct | 9 ms | 7736 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 408 KB | Output is correct |
2 | Correct | 2 ms | 256 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 | 1536 KB | Output is correct |
6 | Correct | 12 ms | 1408 KB | Output is correct |
7 | Correct | 3 ms | 1340 KB | Output is correct |
8 | Correct | 4 ms | 1516 KB | Output is correct |
9 | Correct | 3 ms | 1408 KB | Output is correct |
10 | Correct | 3 ms | 1408 KB | Output is correct |
11 | Correct | 4 ms | 1580 KB | Output is correct |
12 | Correct | 3 ms | 1408 KB | Output is correct |
13 | Correct | 3 ms | 1408 KB | Output is correct |
14 | Correct | 11 ms | 7424 KB | Output is correct |
15 | Correct | 7 ms | 4992 KB | Output is correct |
16 | Correct | 6 ms | 4224 KB | Output is correct |
17 | Correct | 2 ms | 384 KB | Output is correct |
18 | Correct | 12 ms | 7808 KB | Output is correct |
19 | Correct | 10 ms | 7808 KB | Output is correct |
20 | Correct | 12 ms | 7808 KB | Output is correct |
21 | Correct | 11 ms | 7912 KB | Output is correct |
22 | Correct | 12 ms | 7740 KB | Output is correct |
23 | Correct | 10 ms | 7680 KB | Output is correct |
24 | Correct | 12 ms | 7808 KB | Output is correct |
25 | Correct | 10 ms | 7808 KB | Output is correct |
26 | Correct | 9 ms | 7736 KB | Output is correct |
27 | Correct | 154 ms | 80468 KB | Output is correct |
28 | Correct | 27 ms | 26112 KB | Output is correct |
29 | Correct | 13 ms | 7296 KB | Output is correct |
30 | Correct | 2 ms | 640 KB | Output is correct |
31 | Correct | 120 ms | 67192 KB | Output is correct |
32 | Correct | 128 ms | 80580 KB | Output is correct |
33 | Correct | 120 ms | 80256 KB | Output is correct |
34 | Correct | 137 ms | 77768 KB | Output is correct |
35 | Correct | 121 ms | 80524 KB | Output is correct |
36 | Correct | 130 ms | 80232 KB | Output is correct |
37 | Correct | 155 ms | 80496 KB | Output is correct |
38 | Correct | 99 ms | 67084 KB | Output is correct |
39 | Correct | 90 ms | 66988 KB | Output is correct |