이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define MAXH 3010
int h, w;
string s[MAXH];
int main(){
cin >> h >> w;
for(int i = 0; i < h; i++)
cin >> s[i];
int cont = 0;
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if(s[i][j] == 'J'){
int l = 0;
for(int e = 0; e < w; e++){
if(s[i][e] == 'O'){
l = e;
int k = 0;
for(int x = 0; x < h; x++){
if(s[x][j] == 'I'){
k = x;
if(i < k && j < l){
cont++;
}
}
}
}
}
}
}
}
cout << cont << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |