Submission #1173943

#TimeUsernameProblemLanguageResultExecution timeMemory
1173943viwlesxqTracks in the Snow (BOI13_tracks)C++20
2.19 / 100
52 ms18096 KiB
#include <bits/stdc++.h>

using namespace std;

//#define int long long
#define all(x) x.begin(), x.end()

template<class A, class B>
bool chmin(A &a, const B &b) {
    return a > b ? (a = b) == b : false;
} template<class A, class B>
bool chmax(A &a, const B &b) {
    return a < b ? (a = b) == b : false;
}

const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, -1, 1};

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int n, m; cin >> n >> m;

    vector<string> s(n);
    for (int i = 0; i < n; ++i) {
        cin >> s[i];
    }

    int f = 0, r = 0;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            if (s[i][j] == 'F') f = 1;
            if (s[i][j] == 'R') r = 1;
        }
    }

    cout << f + r;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...