This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
int h,w;
cin>>h>>w;
char t[h+1][w+1];
for(int i=1;i<=h;i++)
for(int j=1;j<=w;j++)
cin>>t[i][j];
int c=0;
for(int i=1;i<=h;i++)
for(int k=i+1;k<=h;k++)
for(int j=1;j<=w;j++)
for(int l=j+1;l<=w;l++)
{
if(t[i][j]=='J' && t[i][l]=='O' && t[k][j]=='I')
c++;
}
cout<<c;
return 0 ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |