This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// author - alimammadzade
#include <bits/stdc++.h>
using namespace std;
signed main() {
cin.tie(nullptr)->sync_with_stdio(false);
// system("cls"), freopen("in.txt", "r", stdin);
int n, m;
bool f = 0, r = 0;
cin >> n >> m;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++) {
char c;
cin >> c;
f |= (c == 'F');
r |= (c == 'R');
}
cout << f + r;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |