#include <bits/stdc++.h>
using namespace std;
const int MAX = 200007;
const int MOD = 1000000007;
void solve() {
int n, m;
cin >> n >> m;
char c;
cin >> c;
if (c == 'F') {c = 'R';}
else {c = 'F';}
for (int i = 2; i <= n * m; i++) {
char d;
cin >> d;
if (d == c) {cout << 2; return;}
}
cout << 1;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
//freopen("in.in", "r", stdin); freopen("out.out", "w", stdout);
//int tt; cin >> tt; for (int i = 1; i <= tt; i++) {solve();}
solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
15 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
16 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
17 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
16 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
17 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
21 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
22 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
23 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
24 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
25 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
26 |
Correct |
183 ms |
492 KB |
Output is correct |
27 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
28 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
29 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
30 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |