# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102275 | 2019-03-24T05:14:51 Z | onjo0127 | Bitaro the Brave (JOI19_ho_t1) | C++11 | 809 ms | 18040 KB |
#include <bits/stdc++.h> using namespace std; char A[3009][3009]; int se[3009], ga[3009]; int main() { int H, W; scanf("%d%d",&H,&W); for(int i=1; i<=H; i++) { for(int j=1; j<=W; j++) { scanf(" %c",&A[i][j]); } } long long ans = 0; for(int i=H; i>=1; i--) { for(int j=W; j>=1; j--) { if(A[i][j] == 'J') ans += se[j] * ga[i]; if(A[i][j] == 'I') ++se[j]; if(A[i][j] == 'O') ++ga[i]; } } printf("%lld",ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 3 ms | 640 KB | Output is correct |
7 | Correct | 4 ms | 512 KB | Output is correct |
8 | Correct | 2 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
10 | Correct | 2 ms | 640 KB | Output is correct |
11 | Correct | 3 ms | 640 KB | Output is correct |
12 | Correct | 3 ms | 640 KB | Output is correct |
13 | Correct | 3 ms | 640 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 3 ms | 640 KB | Output is correct |
7 | Correct | 4 ms | 512 KB | Output is correct |
8 | Correct | 2 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
10 | Correct | 2 ms | 640 KB | Output is correct |
11 | Correct | 3 ms | 640 KB | Output is correct |
12 | Correct | 3 ms | 640 KB | Output is correct |
13 | Correct | 3 ms | 640 KB | Output is correct |
14 | Correct | 14 ms | 1920 KB | Output is correct |
15 | Correct | 3 ms | 1536 KB | Output is correct |
16 | Correct | 14 ms | 1152 KB | Output is correct |
17 | Correct | 3 ms | 384 KB | Output is correct |
18 | Correct | 20 ms | 2048 KB | Output is correct |
19 | Correct | 17 ms | 1912 KB | Output is correct |
20 | Correct | 17 ms | 1920 KB | Output is correct |
21 | Correct | 22 ms | 1920 KB | Output is correct |
22 | Correct | 26 ms | 1912 KB | Output is correct |
23 | Correct | 16 ms | 1920 KB | Output is correct |
24 | Correct | 17 ms | 1920 KB | Output is correct |
25 | Correct | 16 ms | 1920 KB | Output is correct |
26 | Correct | 22 ms | 2048 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 3 ms | 640 KB | Output is correct |
7 | Correct | 4 ms | 512 KB | Output is correct |
8 | Correct | 2 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
10 | Correct | 2 ms | 640 KB | Output is correct |
11 | Correct | 3 ms | 640 KB | Output is correct |
12 | Correct | 3 ms | 640 KB | Output is correct |
13 | Correct | 3 ms | 640 KB | Output is correct |
14 | Correct | 14 ms | 1920 KB | Output is correct |
15 | Correct | 3 ms | 1536 KB | Output is correct |
16 | Correct | 14 ms | 1152 KB | Output is correct |
17 | Correct | 3 ms | 384 KB | Output is correct |
18 | Correct | 20 ms | 2048 KB | Output is correct |
19 | Correct | 17 ms | 1912 KB | Output is correct |
20 | Correct | 17 ms | 1920 KB | Output is correct |
21 | Correct | 22 ms | 1920 KB | Output is correct |
22 | Correct | 26 ms | 1912 KB | Output is correct |
23 | Correct | 16 ms | 1920 KB | Output is correct |
24 | Correct | 17 ms | 1920 KB | Output is correct |
25 | Correct | 16 ms | 1920 KB | Output is correct |
26 | Correct | 22 ms | 2048 KB | Output is correct |
27 | Correct | 627 ms | 17588 KB | Output is correct |
28 | Correct | 8 ms | 7168 KB | Output is correct |
29 | Correct | 36 ms | 1656 KB | Output is correct |
30 | Correct | 4 ms | 384 KB | Output is correct |
31 | Correct | 404 ms | 14024 KB | Output is correct |
32 | Correct | 573 ms | 17916 KB | Output is correct |
33 | Correct | 503 ms | 17816 KB | Output is correct |
34 | Correct | 419 ms | 16024 KB | Output is correct |
35 | Correct | 498 ms | 17796 KB | Output is correct |
36 | Correct | 528 ms | 18040 KB | Output is correct |
37 | Correct | 809 ms | 17920 KB | Output is correct |
38 | Correct | 524 ms | 13688 KB | Output is correct |
39 | Correct | 335 ms | 13692 KB | Output is correct |