#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n,m;
cin >> n >> m;
bool rab=false,fox=false;
char zn;
for (int i = 1; i<=n; i++){
for (int j = 1; j<=m; j++){
cin >> zn;
if (zn=='R')rab=true;
if (zn=='F')fox=true;
}
}
int odp=0;
if (rab)odp++;
if (fox)odp++;
cout << odp << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
604 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
604 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
15 |
Incorrect |
4 ms |
604 KB |
Output isn't correct |
16 |
Incorrect |
4 ms |
604 KB |
Output isn't correct |
17 |
Incorrect |
4 ms |
600 KB |
Output isn't correct |
18 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
18 ms |
1848 KB |
Output isn't correct |
3 |
Incorrect |
168 ms |
15908 KB |
Output isn't correct |
4 |
Incorrect |
36 ms |
3920 KB |
Output isn't correct |
5 |
Incorrect |
82 ms |
9004 KB |
Output isn't correct |
6 |
Incorrect |
172 ms |
15952 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
516 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
13 |
Incorrect |
19 ms |
1880 KB |
Output isn't correct |
14 |
Incorrect |
11 ms |
1116 KB |
Output isn't correct |
15 |
Incorrect |
11 ms |
1372 KB |
Output isn't correct |
16 |
Incorrect |
8 ms |
860 KB |
Output isn't correct |
17 |
Incorrect |
47 ms |
4180 KB |
Output isn't correct |
18 |
Incorrect |
52 ms |
4180 KB |
Output isn't correct |
19 |
Incorrect |
39 ms |
3928 KB |
Output isn't correct |
20 |
Incorrect |
36 ms |
3760 KB |
Output isn't correct |
21 |
Incorrect |
95 ms |
9384 KB |
Output isn't correct |
22 |
Incorrect |
77 ms |
8992 KB |
Output isn't correct |
23 |
Incorrect |
90 ms |
7760 KB |
Output isn't correct |
24 |
Incorrect |
99 ms |
9248 KB |
Output isn't correct |
25 |
Incorrect |
181 ms |
16028 KB |
Output isn't correct |
26 |
Correct |
122 ms |
12320 KB |
Output is correct |
27 |
Incorrect |
141 ms |
16032 KB |
Output isn't correct |
28 |
Incorrect |
171 ms |
16032 KB |
Output isn't correct |
29 |
Incorrect |
169 ms |
16032 KB |
Output isn't correct |
30 |
Incorrect |
152 ms |
15516 KB |
Output isn't correct |
31 |
Incorrect |
160 ms |
10320 KB |
Output isn't correct |
32 |
Incorrect |
140 ms |
15900 KB |
Output isn't correct |