답안 #1027162

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1027162 2024-07-19T01:18:21 Z vjudge1 Bitaro the Brave (JOI19_ho_t1) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>
#define ll long long
#define nikah ios_base::sync_with_stdio(0); cin.tie(0);
const ll maxn = 1e4+7;
using namespace std;

ll t,n,m;
char a[3007][3007];

int main () {
	nikah
	cin>>n>>m;
	for (ll i=1; i<=n; i++) {
		for (ll j=1; j<=m; j++) {
			cin>>a[i][j];
		}
	}
	ll ans = 0;
	for (ll i=1; i<=n; i++) {
		for (ll j=1; j<=m; j++) {
			if (a[i][j] != 'J') continue;
			for (ll k=1; k<=n; k++) {
				if (a[k][j] != 'I') continue;
				for (ll l=1; l<=m; l++) {
					if (a[i][j] == 'J' && a[i][l] == 'O'&& a[k][j] == 'I') ans++;
				}
			}
		}
	}
	cout<<ans<<endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -