Submission #886272

#TimeUsernameProblemLanguageResultExecution timeMemory
886272stefanneaguBitaro the Brave (JOI19_ho_t1)C++17
0 / 100
0 ms444 KiB
#include <bits/stdc++.h> using namespace std; const int nmax = 1e3 + 1; char mat[nmax][nmax]; int O[nmax], I[nmax]; int main() { int n, m; cin >> n >> m; for(int i = 1; i <= n; i ++) { for(int j = 1; j <= m; j ++) { cin >> mat[i][j]; if(mat[i][j] == 'O') { O[i] ++; } if(mat[i][j] == 'I') { I[j] ++; } } } int ans = 0; for(int i = 1; i <= n; i ++) { for(int j = 1; j <= n; j ++) { if(mat[i][j] == 'J') { ans += (long long) I[j] * O[i]; } } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...