제출 #1341465

#제출 시각아이디문제언어결과실행 시간메모리
1341465shynycBitaro the Brave (JOI19_ho_t1)C++20
20 / 100
1070 ms684 KiB
#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main(){
    int h,w,count = 0;
    cin >> h >> w;
    string temp;
    vector<string> mp;
    for(int i = 0; i < h; i++){
        cin >> temp;
        mp.push_back(temp);
    }
    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++){
            if(mp[i][j] == 'J'){
                for(int k = i+1; k < h; k++){
                    if(mp[k][j] == 'I'){
                        for(int l = j+1; l < w; l++){
                            if(mp[i][l] == 'O'){
                                count++;
                            }
                        }
                    }
                }
            }
        }
    }
    cout << count;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...