Submission #140849

#TimeUsernameProblemLanguageResultExecution timeMemory
140849Sarah_MokhtarBitaro the Brave (JOI19_ho_t1)C++14
20 / 100
1062 ms2040 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=3e3+10; int n,m,ans; char grid[N][N]; int main(){ cin>>n>>m; for(int i=0;i<n;++i) for(int j=0;j<m;++j) cin>>grid[i][j]; for(int i=0;i<n;++i){ for(int j=0;j<m;++j){ for(int k=0;k<i;++k){ for(int l=0;l<j;++l){ if(grid[k][l]=='J'&&grid[k][j]=='O'&&grid[i][l]=='I') ++ans; } } } } cout<<ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...