Submission #1289593

#TimeUsernameProblemLanguageResultExecution timeMemory
1289593efk44impDango Maker (JOI18_dango_maker)C++20
0 / 100
1 ms576 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; cin >> n >> m; char dizi[n][m]; for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cin >> dizi[i][j]; } } int sayacy = 0; int sayacd = 0; for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ if(j+2 < m){ if(dizi[i][j] == 'R' && dizi[i][j + 1] == 'G' && dizi[i][j + 2] == 'W'){ sayacy++; } } } } for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ if(i+2 < n){ if(dizi[i][j] == 'R' && dizi[i + 1][j] == 'G' && dizi[i + 2][j] == 'W'){ sayacd++; } } } } cout << sayacy + sayacd; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...