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>
using namespace std;
const int H = 4005;
int h, w;
char d[H][H];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> h >> w;
bool fr = false, ff = false;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
cin >> d[i][j];
fr |= (d[i][j] == 'R');
ff |= (d[i][j] == 'F');
}
}
cout << fr + ff;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |