제출 #1289565

#제출 시각아이디문제언어결과실행 시간메모리
1289565faruk2012ekDango Maker (JOI18_dango_maker)C++20
0 / 100
1 ms572 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define sp <<" "<< int inf = 2e18; void solve() { int n=0,m=0; 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 semboller=0; for(int i=0;i<n;i++) { for(int j =0;j<m;j++) { if(dizi[i][j]=='R') { if(dizi[i+1][j]=='G'&&dizi[i+2][j]=='W')semboller++; if(dizi[i][j+1]=='G'&&dizi[i][j+2]=='W') { semboller++; j+=2; } } } } cout<<semboller; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); #ifdef faruk freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif int t = 1; //cin>>t; while (t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...