Jerrychan_666 @ 2024-08-10 10:38:28
#include <iostream>
// #include <graphics.h>
// #include <serialib.h>
using namespace std;
int n,m;
char c_map;
int i_map[101][101];
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
cin>>c_map;
if(c_map=='.')i_map[i][j]=1;
else i_map[i][j]=0;
}
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
if(i_map[i][j]!=0)
{
i_map[i][j]+=i_map[i-1][j]+i_map[i][j-1]+i_map[i+1][j]+i_map[i][j+1];
}
}
}
if(i_map[n][m]>1)cout<<"Yes";
else cout<<"No";
}
by OldDriverTree @ 2024-08-10 10:41:33
@Jerrychan_666
hack
2 2
#.
#.
by topcsa @ 2024-08-10 21:23:55
@OldDriverTree \
不能是这个数据,因为它保证了是从(1, 1)出发 \
所以(1, 1)不能是#
by OldDriverTree @ 2024-08-10 21:43:22
@topcsa 哦哦哦,我人傻了,没看完题
by OldDriverTree @ 2024-08-10 21:43:59
3 3
..#
.#.
#..
那这样