#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
/**
* IDEA:
*/
const int sz = 4e3 + 5;
int m, n;
int a[sz][sz], vi[sz][sz], d[sz][sz];
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
bool valid(int x, int y){
return (x >= 1 && x <= m && y >= 1 && y <= n);
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// freopen("main.inp","r",stdin);
// freopen("main.out","w",stdout);
cin>>m>>n;
int f1 = 0, f2 = 0;
for(int i=1;i<=m;++i){
for(int j=1;j<=n;++j){
char c;
cin>>c;
if(c == '.'){
a[i][j] = -1;
continue;
}
if(c == 'F'){
a[i][j] = 1;
f1 = 1;
}
else{
a[i][j] = 2;
f2 = 1;
}
}
}
cout<<f1 + f2;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
8536 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
2396 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
2396 KB |
Output isn't correct |
4 |
Incorrect |
3 ms |
8540 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
6492 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
6492 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
4444 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
6492 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
6492 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
6492 KB |
Output isn't correct |
15 |
Incorrect |
3 ms |
8540 KB |
Output isn't correct |
16 |
Incorrect |
3 ms |
8540 KB |
Output isn't correct |
17 |
Incorrect |
4 ms |
8540 KB |
Output isn't correct |
18 |
Incorrect |
2 ms |
8664 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
61784 KB |
Output isn't correct |
2 |
Incorrect |
16 ms |
20972 KB |
Output isn't correct |
3 |
Incorrect |
166 ms |
63192 KB |
Output isn't correct |
4 |
Incorrect |
41 ms |
31060 KB |
Output isn't correct |
5 |
Incorrect |
85 ms |
49624 KB |
Output isn't correct |
6 |
Incorrect |
149 ms |
63228 KB |
Output isn't correct |
7 |
Incorrect |
7 ms |
62300 KB |
Output isn't correct |
8 |
Incorrect |
8 ms |
61788 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
11 |
Incorrect |
7 ms |
62040 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
4696 KB |
Output isn't correct |
13 |
Incorrect |
16 ms |
20960 KB |
Output isn't correct |
14 |
Incorrect |
10 ms |
16856 KB |
Output isn't correct |
15 |
Incorrect |
14 ms |
16728 KB |
Output isn't correct |
16 |
Incorrect |
7 ms |
8540 KB |
Output isn't correct |
17 |
Incorrect |
42 ms |
33252 KB |
Output isn't correct |
18 |
Incorrect |
49 ms |
33108 KB |
Output isn't correct |
19 |
Incorrect |
48 ms |
31208 KB |
Output isn't correct |
20 |
Incorrect |
33 ms |
29008 KB |
Output isn't correct |
21 |
Incorrect |
83 ms |
49492 KB |
Output isn't correct |
22 |
Incorrect |
84 ms |
49668 KB |
Output isn't correct |
23 |
Incorrect |
70 ms |
41300 KB |
Output isn't correct |
24 |
Incorrect |
91 ms |
49492 KB |
Output isn't correct |
25 |
Incorrect |
197 ms |
63320 KB |
Output isn't correct |
26 |
Correct |
114 ms |
55636 KB |
Output is correct |
27 |
Incorrect |
150 ms |
63200 KB |
Output isn't correct |
28 |
Incorrect |
154 ms |
63344 KB |
Output isn't correct |
29 |
Incorrect |
149 ms |
63244 KB |
Output isn't correct |
30 |
Incorrect |
147 ms |
61956 KB |
Output isn't correct |
31 |
Incorrect |
99 ms |
51680 KB |
Output isn't correct |
32 |
Incorrect |
157 ms |
63472 KB |
Output isn't correct |