This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define GOOD_LUCK ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define int long long
#define endl "\n"
#define MAX 10005
#define INF 1000000000
#define MOD 16714589
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
using namespace std;
const int MAXN = 1e+5;
int temp;
signed main() {
GOOD_LUCK
int t;
t = 1;
// cin >> t;
while (t--) {
int n, m;
cin >> n >> m;
char a[n][m];
int x=0, y=0;
for (int i=0; i < n; i++) {
for (int j=0; j < m ;j++) {
cin >> a[i][j];
if (a[i][j] =='F')x = 1;
if (a[i][j] == 'R') y = 1;
}
}
cout << x + y;
}
return 0;
}
// Problem B
// by Ekber_Ekber
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |