Submission #471476

# Submission time Handle Problem Language Result Execution time Memory
471476 2021-09-09T13:20:04 Z fuad27 Bitaro the Brave (JOI19_ho_t1) C++17
0 / 100
1 ms 216 KB
#include<bits/stdc++.h>
using namespace std;
int main () {
	int h, w;
	cin >> h >> w;
	string v[h];
	for(int i = 0;i<h;i++)cin>>v[i];
	int cnt[w] = {0}, ans = 0, k = 0;
	for(int i = h-1;i>=0;i--) {
		k = 0;
		for(int j = w-1;j>=0;j--) {
			if(v[i][j] == 'J')ans+=cnt[j]*k;
			else if(v[i][j] == 'I')k++;
			else cnt[j]++;
		}
	}
	cout<<ans<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 216 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 216 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 216 KB Output isn't correct
2 Halted 0 ms 0 KB -