Submission #717592

# Submission time Handle Problem Language Result Execution time Memory
717592 2023-04-02T08:56:39 Z vjudge1 Bitaro the Brave (JOI19_ho_t1) C++11
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>

using namespace std;
int arr[3005][3005];
vector<int> il;
vector<int> ij;
vector<int> ji;
vector<int> kj;
int main(){
    int r,c;
    cin >> r >> c;
    for(int i=0;i<r;i++){
        for(int j=0;j<c;j++){
            cin >> arr[i][j];
            if(arr[i][j]=='J'){
                ij.push_back(i);
                ji.push_back(j);
            }
            else if(arr[i][j]=='O'){
                il.push_back(i);
            }
            else if(arr[i][j]=='I'){
                kj.push_back(j);
            }
        }
    }
    int cnti=0,cntj=0;
    for(int i : il){
        for(int j : ij){
            if(i==j){
                cnti++;
                break;
            }
        }
    }
    for(int i : ji){
        for(int j : kj){
            if(i==j){
                cntj++;
                break;
            }
        }
    }
    cout << cnti*cntj;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -