# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
134424 | 2019-07-22T16:37:21 Z | Boxworld | Bitaro the Brave (JOI19_ho_t1) | C++14 | 108 ms | 18040 KB |
#include <bits/stdc++.h> using namespace std; const int maxN=3010; int h[maxN],w[maxN]; char s[maxN][maxN]; long long ans=0; int main(){ int n,m; scanf("%d%d",&n,&m); memset(h,0,sizeof(h)); memset(w,0,sizeof(w)); for (int i=0;i<n;i++)scanf("%s",s[i]); for (int i=n-1;i>=0;i--) for (int j=m-1;j>=0;j--){ if (s[i][j]=='O')h[i]++; if (s[i][j]=='I')w[j]++; if (s[i][j]=='J')ans+=h[i]*w[j]; } printf("%lld\n",ans); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 380 KB | Output is correct |
5 | Correct | 2 ms | 632 KB | Output is correct |
6 | Correct | 2 ms | 632 KB | Output is correct |
7 | Correct | 2 ms | 632 KB | Output is correct |
8 | Correct | 2 ms | 632 KB | Output is correct |
9 | Correct | 2 ms | 632 KB | Output is correct |
10 | Correct | 2 ms | 632 KB | Output is correct |
11 | Correct | 2 ms | 632 KB | Output is correct |
12 | Correct | 2 ms | 632 KB | Output is correct |
13 | Correct | 2 ms | 632 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 380 KB | Output is correct |
5 | Correct | 2 ms | 632 KB | Output is correct |
6 | Correct | 2 ms | 632 KB | Output is correct |
7 | Correct | 2 ms | 632 KB | Output is correct |
8 | Correct | 2 ms | 632 KB | Output is correct |
9 | Correct | 2 ms | 632 KB | Output is correct |
10 | Correct | 2 ms | 632 KB | Output is correct |
11 | Correct | 2 ms | 632 KB | Output is correct |
12 | Correct | 2 ms | 632 KB | Output is correct |
13 | Correct | 2 ms | 632 KB | Output is correct |
14 | Correct | 5 ms | 1784 KB | Output is correct |
15 | Correct | 3 ms | 1656 KB | Output is correct |
16 | Correct | 3 ms | 1144 KB | Output is correct |
17 | Correct | 2 ms | 376 KB | Output is correct |
18 | Correct | 6 ms | 1832 KB | Output is correct |
19 | Correct | 5 ms | 1784 KB | Output is correct |
20 | Correct | 5 ms | 1784 KB | Output is correct |
21 | Correct | 7 ms | 2040 KB | Output is correct |
22 | Correct | 5 ms | 2040 KB | Output is correct |
23 | Correct | 5 ms | 2040 KB | Output is correct |
24 | Correct | 7 ms | 2020 KB | Output is correct |
25 | Correct | 5 ms | 2040 KB | Output is correct |
26 | Correct | 5 ms | 2040 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 380 KB | Output is correct |
5 | Correct | 2 ms | 632 KB | Output is correct |
6 | Correct | 2 ms | 632 KB | Output is correct |
7 | Correct | 2 ms | 632 KB | Output is correct |
8 | Correct | 2 ms | 632 KB | Output is correct |
9 | Correct | 2 ms | 632 KB | Output is correct |
10 | Correct | 2 ms | 632 KB | Output is correct |
11 | Correct | 2 ms | 632 KB | Output is correct |
12 | Correct | 2 ms | 632 KB | Output is correct |
13 | Correct | 2 ms | 632 KB | Output is correct |
14 | Correct | 5 ms | 1784 KB | Output is correct |
15 | Correct | 3 ms | 1656 KB | Output is correct |
16 | Correct | 3 ms | 1144 KB | Output is correct |
17 | Correct | 2 ms | 376 KB | Output is correct |
18 | Correct | 6 ms | 1832 KB | Output is correct |
19 | Correct | 5 ms | 1784 KB | Output is correct |
20 | Correct | 5 ms | 1784 KB | Output is correct |
21 | Correct | 7 ms | 2040 KB | Output is correct |
22 | Correct | 5 ms | 2040 KB | Output is correct |
23 | Correct | 5 ms | 2040 KB | Output is correct |
24 | Correct | 7 ms | 2020 KB | Output is correct |
25 | Correct | 5 ms | 2040 KB | Output is correct |
26 | Correct | 5 ms | 2040 KB | Output is correct |
27 | Correct | 104 ms | 17556 KB | Output is correct |
28 | Correct | 8 ms | 7288 KB | Output is correct |
29 | Correct | 6 ms | 1784 KB | Output is correct |
30 | Correct | 2 ms | 412 KB | Output is correct |
31 | Correct | 77 ms | 13816 KB | Output is correct |
32 | Correct | 55 ms | 17912 KB | Output is correct |
33 | Correct | 58 ms | 17916 KB | Output is correct |
34 | Correct | 95 ms | 15956 KB | Output is correct |
35 | Correct | 63 ms | 18040 KB | Output is correct |
36 | Correct | 56 ms | 17912 KB | Output is correct |
37 | Correct | 108 ms | 18040 KB | Output is correct |
38 | Correct | 42 ms | 13892 KB | Output is correct |
39 | Correct | 40 ms | 13816 KB | Output is correct |