제출 #1338394

#제출 시각아이디문제언어결과실행 시간메모리
1338394m0useTracks in the Snow (BOI13_tracks)C++20
0 / 100
170 ms16088 KiB
#include<bits/stdc++.h>
#define ll long long
using namespace std;

const int MAX_W = 4e3+1;
char grid[MAX_W][MAX_W]{}, r_cnt = 0, f_cnt = 0;
int w, h;
int main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    cin >> h >> w;
    for(int i = 1; i <= h; i++) for(int j = 1; j <= w; j++) {
        cin >> grid[i][j];
        if(grid[i][j]=='R') r_cnt++;
        else if(grid[i][j]=='F') f_cnt++;
    }
    int ans = (r_cnt>0)+(f_cnt>0);
    cout << ans << '\n';
    
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...