Submission #1099359

#TimeUsernameProblemLanguageResultExecution timeMemory
1099359andreiqwerBitaro the Brave (JOI19_ho_t1)C++17
50 / 100
1061 ms17492 KiB
#include <iostream> using namespace std; int h, w; long long cntfin; char s[3001][3001]; int main() { cin>>h>>w; for(int i=1; i<=h; i++) { for(int j=1; j<=w; j++) cin>>s[i][j]; } for(int i=1; i<=h; i++) { for(int j=1; j<=w; j++) { if(s[i][j]=='J') { int ocnt=0, icnt=0; for(int l=j+1; l<=w; l++) { if(s[i][l]=='O') ocnt++; } for(int k=i+1; k<=h; k++) { if(s[k][j]=='I') icnt++; } cntfin+=ocnt*icnt; } } } cout<<cntfin; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...