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;
using ll = long long;
int w, h;
char grid[4069][4069];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> h >> w;
int f = 0;
int r = 0;
for (int i = 0; i < h; i++) {
cin >> grid[i];
for (int j = 0; j < w; j++) {
if (grid[i][j] == 'F') f = 1;
if (grid[i][j] == 'R') r = 1;
}
}
cout << f + r << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |