Submission #717592

#TimeUsernameProblemLanguageResultExecution timeMemory
717592vjudge1Bitaro the Brave (JOI19_ho_t1)C++11
0 / 100
1 ms212 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...