Submission #1098290

#TimeUsernameProblemLanguageResultExecution timeMemory
1098290SSKMFBitaro the Brave (JOI19_ho_t1)C++17
100 / 100
91 ms18048 KiB
#include <bits/stdc++.h> using namespace std; char matrice[3001][3001]; int main () { ios :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int linii , coloane; cin >> linii >> coloane; int aparitii[3000] = { }; for (int linie = 0 ; linie < linii ; linie++) { cin >> matrice[linie]; for (int coloana = 0 ; coloana < coloane ; coloana++) { if (matrice[linie][coloana] == 'I') { aparitii[coloana]++; } } } int64_t total = 0; for (int linie = 0 ; linie < linii ; linie++) { for (int coloana = 0 , termen = 0 ; coloana < coloane ; coloana++) { if (matrice[linie][coloana] == 'O') { total += termen; } else if (matrice[linie][coloana] == 'J') { termen += aparitii[coloana]; } else { aparitii[coloana]--; } } } cout << total; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...