Submission #944802

#TimeUsernameProblemLanguageResultExecution timeMemory
944802ezzzayBitaro the Brave (JOI19_ho_t1)C++14
20 / 100
1054 ms2760 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back const int N=2e3+2; char a[N][N]; signed main(){ int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } int cnt=0; for(int i=1;i<=n;i++){ for(int k=i+1;k<=n;k++){ for(int j=1;j<=m;j++){ for(int l=j+1;l<=m;l++){ if(a[i][j]=='J' and a[i][l]=='O' and a[k][j]=='I')cnt++; } } } } cout<<cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...