Submission #110337

#TimeUsernameProblemLanguageResultExecution timeMemory
110337pamajBitaro the Brave (JOI19_ho_t1)C++14
20 / 100
1066 ms1792 KiB
#include <bits/stdc++.h> using namespace std; const int maxn = 3e3 + 10; int main() { char tab[maxn][maxn]; int H, W; cin >> H >> W; for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { cin >> tab[i][j]; } } int cont = 0; for(int i = 0; i < H - 1; i++) { for(int j = 0; j < W - 1; j++) { for(int k = i + 1; k < H; k++) { for(int l = j + 1; l < W; l++) { if(tab[i][j] == 'J' and tab[i][l] == 'O' and tab[k][j] == 'I') cont++; } } } } cout << cont << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...