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;
int main(){
int h,w,cnt = 0, cnt2 =0 ;
cin >> h >> w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
char a;
cin >> a;
if(a == 'R')cnt = max(1, cnt);
if(a == 'F')cnt2 = max(1, cnt2);
}
}
cout << cnt + cnt2;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |