Submission #1352206

#TimeUsernameProblemLanguageResultExecution timeMemory
1352206mahmudisaliTracks in the Snow (BOI13_tracks)C++17
2.19 / 100
107 ms436 KiB
// Mahmud Isali
#pragma GCC optimize("O3,unroll-loops")

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

const long long INF = 4e18, MOD = 998244353, N = 1e5 + 5;
void solve() {
    int n,m;
    cin >> n >> m;
    int cnt1 = 0, cnt2 = 0;
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= m; j++) {
            char c;
            cin >> c;
            if(c == 'F')    cnt1 = 1;
            else if(c == 'R')   cnt2 = 1;
        }
    }
    cout << cnt1 + cnt2 << endl;
}       
signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t = 1;
    // cin >> t;
    for (int i = 1; i <= t; i++) {
        // cout << "\n-----Case-----" << i << "\n";
        solve();
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...