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() {
//setIO();
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long n,m;
cin>>n>>m;
long ans=0;
long sum=0;
char a[n][m];
for(long i=0;i<n;i++)
{
for(long y=0;y<m;y++)
{
cin>>a[i][y];
if(a[i][y]=='R')
{
ans=1;
}else
if(a[i][y]=='F')
{
sum=1;
}
}
}
cout<<sum+ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |