#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#define bupol __builtin_popcount
//#define int long long
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
using namespace std;
const int MAXN = 2e5+5;
const int MAXK = 205;
const int LOG = 20;
const int MOD = 1e9+7;
const int SQRT = 520;
const int INF = 1e9+10;
typedef pair<ll,ll> pii;
typedef pair<ll,pii> ipii;
int h, w;
string s[4010];
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> h >> w;
for(int i=0; i<h; i++){
cin >> s[i];
}
int ans = 0, an = 0; set<char> x;
for(int i=0; i<h; i++){
for(int j=0; j<w; j++){
if(s[i][j]=='.') continue;
if(s[i][j] == 'F') ans = 1;
else if(s[i][j] == 'R') an = 1;
}
}
cout << ans+an << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
856 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
712 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
596 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
860 KB |
Output isn't correct |
16 |
Incorrect |
2 ms |
856 KB |
Output isn't correct |
17 |
Incorrect |
2 ms |
860 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
856 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
2 |
Incorrect |
7 ms |
3608 KB |
Output isn't correct |
3 |
Incorrect |
64 ms |
33876 KB |
Output isn't correct |
4 |
Incorrect |
18 ms |
8176 KB |
Output isn't correct |
5 |
Incorrect |
25 ms |
18880 KB |
Output isn't correct |
6 |
Incorrect |
78 ms |
33896 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
604 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
13 |
Incorrect |
9 ms |
3928 KB |
Output isn't correct |
14 |
Incorrect |
5 ms |
2396 KB |
Output isn't correct |
15 |
Incorrect |
5 ms |
2396 KB |
Output isn't correct |
16 |
Incorrect |
4 ms |
1884 KB |
Output isn't correct |
17 |
Incorrect |
18 ms |
8796 KB |
Output isn't correct |
18 |
Incorrect |
22 ms |
8536 KB |
Output isn't correct |
19 |
Incorrect |
17 ms |
8340 KB |
Output isn't correct |
20 |
Incorrect |
15 ms |
7424 KB |
Output isn't correct |
21 |
Incorrect |
38 ms |
19632 KB |
Output isn't correct |
22 |
Incorrect |
29 ms |
19056 KB |
Output isn't correct |
23 |
Incorrect |
40 ms |
16528 KB |
Output isn't correct |
24 |
Incorrect |
41 ms |
19028 KB |
Output isn't correct |
25 |
Incorrect |
96 ms |
33728 KB |
Output isn't correct |
26 |
Correct |
46 ms |
26120 KB |
Output is correct |
27 |
Incorrect |
59 ms |
33876 KB |
Output isn't correct |
28 |
Incorrect |
67 ms |
33788 KB |
Output isn't correct |
29 |
Incorrect |
67 ms |
33816 KB |
Output isn't correct |
30 |
Incorrect |
60 ms |
33292 KB |
Output isn't correct |
31 |
Incorrect |
69 ms |
21692 KB |
Output isn't correct |
32 |
Incorrect |
54 ms |
33712 KB |
Output isn't correct |