Submission #947621

# Submission time Handle Problem Language Result Execution time Memory
947621 2024-03-16T16:29:21 Z Kongggwp Mecho (IOI09_mecho) C++14
5 / 100
14 ms 34164 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long int
int n , m , ao[3005][3005] , ai[3005][3005] , sum;
char a[3005][3005] ;
int32_t main()
{
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin >> n >> m;
	for(int i=0 ; i<n ; i++)
	{
		for(int j=0 ; j<m ; j++)
		{
			cin >> a[i][j];
			if(a[i][j]=='O')ao[i][j]++;
			if(a[i][j]=='I')ai[i][j]++;
		}
	}
	for(int i=n-1 ; i>=0 ; i--)for(int j=m-1 ; j>=0 ; j--)ao[i][j]+=ao[i][j+1] , ai[i][j]+=ai[i+1][j];
	for(int i=n-1 ; i>=0 ; i--)for(int j=m-1 ; j>=0 ; j--)if(a[i][j]=='J')sum += ao[i][j] * ai[i][j];
	cout << sum;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 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 0 ms 468 KB Output isn't correct
5 Correct 1 ms 344 KB Output is correct
6 Incorrect 0 ms 348 KB Output isn't correct
7 Incorrect 5 ms 26796 KB Output isn't correct
8 Incorrect 0 ms 600 KB Output isn't correct
9 Incorrect 0 ms 604 KB Output isn't correct
10 Incorrect 0 ms 604 KB Output isn't correct
11 Incorrect 0 ms 604 KB Output isn't correct
12 Incorrect 1 ms 1116 KB Output isn't correct
13 Correct 1 ms 860 KB Output is correct
14 Incorrect 1 ms 1116 KB Output isn't correct
15 Incorrect 1 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 0 ms 604 KB Output isn't correct
19 Incorrect 1 ms 600 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 860 KB Output isn't correct
24 Incorrect 1 ms 856 KB Output isn't correct
25 Incorrect 1 ms 1112 KB Output isn't correct
26 Incorrect 1 ms 1116 KB Output isn't correct
27 Incorrect 1 ms 3164 KB Output isn't correct
28 Incorrect 1 ms 3164 KB Output isn't correct
29 Incorrect 1 ms 3164 KB Output isn't correct
30 Incorrect 1 ms 3164 KB Output isn't correct
31 Incorrect 1 ms 3164 KB Output isn't correct
32 Incorrect 1 ms 3160 KB Output isn't correct
33 Incorrect 2 ms 10584 KB Output isn't correct
34 Incorrect 3 ms 11100 KB Output isn't correct
35 Incorrect 4 ms 13144 KB Output isn't correct
36 Incorrect 3 ms 10920 KB Output isn't correct
37 Incorrect 4 ms 13404 KB Output isn't correct
38 Incorrect 5 ms 14172 KB Output isn't correct
39 Incorrect 2 ms 13148 KB Output isn't correct
40 Incorrect 4 ms 15744 KB Output isn't correct
41 Incorrect 6 ms 16464 KB Output isn't correct
42 Incorrect 3 ms 13404 KB Output isn't correct
43 Incorrect 5 ms 16464 KB Output isn't correct
44 Incorrect 7 ms 17496 KB Output isn't correct
45 Incorrect 3 ms 15648 KB Output isn't correct
46 Incorrect 5 ms 18780 KB Output isn't correct
47 Incorrect 8 ms 20028 KB Output isn't correct
48 Incorrect 3 ms 17756 KB Output isn't correct
49 Incorrect 7 ms 20828 KB Output isn't correct
50 Incorrect 8 ms 22364 KB Output isn't correct
51 Incorrect 3 ms 18008 KB Output isn't correct
52 Incorrect 7 ms 23132 KB Output isn't correct
53 Incorrect 10 ms 24816 KB Output isn't correct
54 Incorrect 4 ms 20060 KB Output isn't correct
55 Incorrect 7 ms 25436 KB Output isn't correct
56 Incorrect 12 ms 27228 KB Output isn't correct
57 Incorrect 3 ms 20572 KB Output isn't correct
58 Incorrect 8 ms 26204 KB Output isn't correct
59 Incorrect 12 ms 29704 KB Output isn't correct
60 Incorrect 4 ms 24668 KB Output isn't correct
61 Incorrect 9 ms 30552 KB Output isn't correct
62 Incorrect 14 ms 34164 KB Output isn't correct
63 Correct 4 ms 24668 KB Output is correct
64 Incorrect 14 ms 32348 KB Output isn't correct
65 Incorrect 4 ms 24668 KB Output isn't correct
66 Incorrect 4 ms 24668 KB Output isn't correct
67 Incorrect 4 ms 24668 KB Output isn't correct
68 Correct 5 ms 26712 KB Output is correct
69 Incorrect 8 ms 29740 KB Output isn't correct
70 Incorrect 4 ms 26460 KB Output isn't correct
71 Incorrect 4 ms 26448 KB Output isn't correct
72 Incorrect 8 ms 29788 KB Output isn't correct
73 Incorrect 4 ms 26456 KB Output isn't correct
74 Incorrect 11 ms 31324 KB Output isn't correct
75 Incorrect 4 ms 26460 KB Output isn't correct
76 Incorrect 4 ms 24664 KB Output isn't correct
77 Incorrect 4 ms 26460 KB Output isn't correct
78 Incorrect 4 ms 26460 KB Output isn't correct
79 Incorrect 11 ms 31580 KB Output isn't correct
80 Incorrect 5 ms 26460 KB Output isn't correct
81 Incorrect 4 ms 26460 KB Output isn't correct
82 Incorrect 4 ms 26548 KB Output isn't correct
83 Correct 4 ms 26448 KB Output is correct
84 Incorrect 11 ms 31576 KB Output isn't correct
85 Incorrect 5 ms 26716 KB Output isn't correct
86 Incorrect 5 ms 26460 KB Output isn't correct
87 Incorrect 5 ms 26716 KB Output isn't correct
88 Correct 4 ms 26460 KB Output is correct
89 Incorrect 14 ms 31836 KB Output isn't correct
90 Incorrect 5 ms 26712 KB Output isn't correct
91 Incorrect 5 ms 26972 KB Output isn't correct
92 Incorrect 5 ms 26716 KB Output isn't correct