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;
#define ll long long int
#define sz(x) (int)x.size()
#define ff first
#define ss second
const ll N = 4005;
const ll M = 1e9 + 7;
int T, n, m;
char c[N][N];
int main(){
cin >> n >> m;
bool tr1 = 0, tr2 = 0;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> c[i][j];
if(c[i][j] == 'R') tr1 = 1;
if(c[i][j] == 'F') tr2 = 1;
}
}
cout << tr1 + tr2;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |