# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
947613 |
2024-03-16T15:59:12 Z |
packmani |
Mecho (IOI09_mecho) |
C++14 |
|
18 ms |
28764 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[i][j]*suff_o[i][j];
}
}
}
cout << sum;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
5 |
Correct |
0 ms |
604 KB |
Output is correct |
6 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
7 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
604 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
792 KB |
Output isn't correct |
13 |
Correct |
1 ms |
860 KB |
Output is correct |
14 |
Incorrect |
1 ms |
1016 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 |
1 ms |
604 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
21 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
22 |
Incorrect |
1 ms |
860 KB |
Output isn't correct |
23 |
Incorrect |
1 ms |
924 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 |
2 ms |
1052 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 |
4 ms |
8684 KB |
Output isn't correct |
34 |
Incorrect |
4 ms |
9304 KB |
Output isn't correct |
35 |
Incorrect |
5 ms |
9816 KB |
Output isn't correct |
36 |
Incorrect |
5 ms |
10820 KB |
Output isn't correct |
37 |
Incorrect |
5 ms |
11352 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 |
13656 KB |
Output isn't correct |
41 |
Incorrect |
7 ms |
14428 KB |
Output isn't correct |
42 |
Incorrect |
6 ms |
13660 KB |
Output isn't correct |
43 |
Incorrect |
7 ms |
14680 KB |
Output isn't correct |
44 |
Incorrect |
8 ms |
15812 KB |
Output isn't correct |
45 |
Incorrect |
7 ms |
15704 KB |
Output isn't correct |
46 |
Incorrect |
8 ms |
17072 KB |
Output isn't correct |
47 |
Incorrect |
10 ms |
18268 KB |
Output isn't correct |
48 |
Incorrect |
9 ms |
16288 KB |
Output isn't correct |
49 |
Incorrect |
10 ms |
17752 KB |
Output isn't correct |
50 |
Incorrect |
11 ms |
19292 KB |
Output isn't correct |
51 |
Incorrect |
9 ms |
18420 KB |
Output isn't correct |
52 |
Incorrect |
12 ms |
20316 KB |
Output isn't correct |
53 |
Incorrect |
13 ms |
21924 KB |
Output isn't correct |
54 |
Incorrect |
14 ms |
19192 KB |
Output isn't correct |
55 |
Incorrect |
13 ms |
21084 KB |
Output isn't correct |
56 |
Incorrect |
15 ms |
23340 KB |
Output isn't correct |
57 |
Incorrect |
12 ms |
21084 KB |
Output isn't correct |
58 |
Incorrect |
14 ms |
23544 KB |
Output isn't correct |
59 |
Incorrect |
17 ms |
25948 KB |
Output isn't correct |
60 |
Incorrect |
13 ms |
23336 KB |
Output isn't correct |
61 |
Incorrect |
15 ms |
25948 KB |
Output isn't correct |
62 |
Incorrect |
18 ms |
28508 KB |
Output isn't correct |
63 |
Correct |
13 ms |
23384 KB |
Output is correct |
64 |
Incorrect |
18 ms |
28764 KB |
Output isn't correct |
65 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
66 |
Incorrect |
13 ms |
23384 KB |
Output isn't correct |
67 |
Incorrect |
13 ms |
23468 KB |
Output isn't correct |
68 |
Correct |
13 ms |
23644 KB |
Output is correct |
69 |
Incorrect |
15 ms |
24868 KB |
Output isn't correct |
70 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
71 |
Incorrect |
13 ms |
23332 KB |
Output isn't correct |
72 |
Incorrect |
16 ms |
24924 KB |
Output isn't correct |
73 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
74 |
Incorrect |
16 ms |
26492 KB |
Output isn't correct |
75 |
Incorrect |
14 ms |
23388 KB |
Output isn't correct |
76 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
77 |
Incorrect |
13 ms |
23488 KB |
Output isn't correct |
78 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
79 |
Incorrect |
16 ms |
26716 KB |
Output isn't correct |
80 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
81 |
Incorrect |
13 ms |
23260 KB |
Output isn't correct |
82 |
Incorrect |
13 ms |
23560 KB |
Output isn't correct |
83 |
Correct |
13 ms |
23388 KB |
Output is correct |
84 |
Incorrect |
17 ms |
26856 KB |
Output isn't correct |
85 |
Incorrect |
13 ms |
23644 KB |
Output isn't correct |
86 |
Incorrect |
13 ms |
23388 KB |
Output isn't correct |
87 |
Incorrect |
13 ms |
23548 KB |
Output isn't correct |
88 |
Correct |
13 ms |
23644 KB |
Output is correct |
89 |
Incorrect |
17 ms |
26964 KB |
Output isn't correct |
90 |
Incorrect |
13 ms |
23704 KB |
Output isn't correct |
91 |
Incorrect |
13 ms |
23896 KB |
Output isn't correct |
92 |
Incorrect |
14 ms |
23644 KB |
Output isn't correct |