# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
947615 |
2024-03-16T16:17:15 Z |
packmani |
Mecho (IOI09_mecho) |
C++14 |
|
19 ms |
28508 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long int
int n,m;
string s[3005];
int suff_o[3005][3005];
int suff_i[3005][3005];
int sum;
int32_t main()
{
cin >> n >> m;
for(int i=0;i<n;i++)
cin >> s[i];
for(int i=0;i<n;i++)
{
for(int j=m-1;j>=0;j--)
{
suff_o[i][j]=suff_o[i][j+1];
if(s[i][j]=='O') suff_o[i][j]++;
}
}
for(int i=0;i<m;i++)
{
for(int j=n-1;j>=0;j--)
{
suff_i[j][i]=suff_i[j+1][i];
if(s[j][i]=='I') suff_i[j][i]++;
}
}
sum=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
if(s[i][j]=='J')
{
sum+=(suff_i[j][i])*(suff_o[i][j]);
}
}
}
cout << sum;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
7 |
Incorrect |
14 ms |
23132 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
13 |
Correct |
1 ms |
860 KB |
Output is correct |
14 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
15 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
16 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
17 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
18 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
20 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
21 |
Incorrect |
0 ms |
860 KB |
Output isn't correct |
22 |
Incorrect |
0 ms |
860 KB |
Output isn't correct |
23 |
Incorrect |
0 ms |
860 KB |
Output isn't correct |
24 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
25 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
26 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
27 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
28 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
29 |
Incorrect |
1 ms |
1116 KB |
Output isn't correct |
30 |
Incorrect |
1 ms |
1116 KB |
Output isn't correct |
31 |
Incorrect |
1 ms |
1116 KB |
Output isn't correct |
32 |
Incorrect |
1 ms |
1116 KB |
Output isn't correct |
33 |
Incorrect |
3 ms |
8540 KB |
Output isn't correct |
34 |
Incorrect |
4 ms |
9048 KB |
Output isn't correct |
35 |
Incorrect |
5 ms |
9816 KB |
Output isn't correct |
36 |
Incorrect |
4 ms |
10588 KB |
Output isn't correct |
37 |
Incorrect |
5 ms |
11356 KB |
Output isn't correct |
38 |
Incorrect |
6 ms |
12124 KB |
Output isn't correct |
39 |
Incorrect |
5 ms |
12892 KB |
Output isn't correct |
40 |
Incorrect |
6 ms |
13660 KB |
Output isn't correct |
41 |
Incorrect |
7 ms |
14424 KB |
Output isn't correct |
42 |
Incorrect |
7 ms |
13556 KB |
Output isn't correct |
43 |
Incorrect |
8 ms |
14428 KB |
Output isn't correct |
44 |
Incorrect |
8 ms |
15708 KB |
Output isn't correct |
45 |
Incorrect |
7 ms |
15708 KB |
Output isn't correct |
46 |
Incorrect |
8 ms |
16732 KB |
Output isn't correct |
47 |
Incorrect |
10 ms |
18008 KB |
Output isn't correct |
48 |
Incorrect |
8 ms |
15964 KB |
Output isn't correct |
49 |
Incorrect |
16 ms |
17640 KB |
Output isn't correct |
50 |
Incorrect |
11 ms |
19292 KB |
Output isn't correct |
51 |
Incorrect |
9 ms |
18268 KB |
Output isn't correct |
52 |
Incorrect |
12 ms |
19804 KB |
Output isn't correct |
53 |
Incorrect |
12 ms |
21596 KB |
Output isn't correct |
54 |
Incorrect |
10 ms |
18524 KB |
Output isn't correct |
55 |
Incorrect |
12 ms |
20828 KB |
Output isn't correct |
56 |
Incorrect |
15 ms |
22876 KB |
Output isn't correct |
57 |
Incorrect |
11 ms |
20828 KB |
Output isn't correct |
58 |
Incorrect |
14 ms |
23132 KB |
Output isn't correct |
59 |
Incorrect |
17 ms |
25436 KB |
Output isn't correct |
60 |
Incorrect |
13 ms |
22876 KB |
Output isn't correct |
61 |
Incorrect |
15 ms |
25436 KB |
Output isn't correct |
62 |
Incorrect |
18 ms |
27996 KB |
Output isn't correct |
63 |
Correct |
13 ms |
22876 KB |
Output is correct |
64 |
Incorrect |
19 ms |
28508 KB |
Output isn't correct |
65 |
Incorrect |
12 ms |
22876 KB |
Output isn't correct |
66 |
Incorrect |
12 ms |
22876 KB |
Output isn't correct |
67 |
Incorrect |
13 ms |
22880 KB |
Output isn't correct |
68 |
Correct |
13 ms |
23132 KB |
Output is correct |
69 |
Incorrect |
15 ms |
24636 KB |
Output isn't correct |
70 |
Incorrect |
14 ms |
23168 KB |
Output isn't correct |
71 |
Incorrect |
13 ms |
23132 KB |
Output isn't correct |
72 |
Incorrect |
14 ms |
24668 KB |
Output isn't correct |
73 |
Incorrect |
13 ms |
22876 KB |
Output isn't correct |
74 |
Incorrect |
15 ms |
26204 KB |
Output isn't correct |
75 |
Incorrect |
12 ms |
22876 KB |
Output isn't correct |
76 |
Incorrect |
14 ms |
23020 KB |
Output isn't correct |
77 |
Incorrect |
13 ms |
23132 KB |
Output isn't correct |
78 |
Incorrect |
13 ms |
23004 KB |
Output isn't correct |
79 |
Incorrect |
16 ms |
26204 KB |
Output isn't correct |
80 |
Incorrect |
12 ms |
22960 KB |
Output isn't correct |
81 |
Incorrect |
12 ms |
22876 KB |
Output isn't correct |
82 |
Incorrect |
16 ms |
23456 KB |
Output isn't correct |
83 |
Correct |
12 ms |
23132 KB |
Output is correct |
84 |
Incorrect |
16 ms |
26508 KB |
Output isn't correct |
85 |
Incorrect |
13 ms |
23132 KB |
Output isn't correct |
86 |
Incorrect |
13 ms |
23132 KB |
Output isn't correct |
87 |
Incorrect |
14 ms |
23132 KB |
Output isn't correct |
88 |
Correct |
13 ms |
23128 KB |
Output is correct |
89 |
Incorrect |
17 ms |
26716 KB |
Output isn't correct |
90 |
Incorrect |
12 ms |
23132 KB |
Output isn't correct |
91 |
Incorrect |
13 ms |
23516 KB |
Output isn't correct |
92 |
Incorrect |
12 ms |
23128 KB |
Output isn't correct |