#include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int ans = 0;
char grid[H][W];
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
for (int k = 1; k <= H; k++) {
for (int l = 1; l <= W; l++) {
ans += (grid[i - 1][j - 1] == 'J' && grid[i - 1][l - 1] == 'O' && grid[k - 1][j - 1] == 'I');
}
}
}
}
cout << ans << endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |