提交的两次重要错误:
1.标记问题,访问完成后没有及时标记,造成TLE
2.输出格式问题,没有输出IMPOSSIBLE
#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<vector>
#include<cmath>
#include<map>
#include<stack>
using namespace std;
const int maxn=1e2+3;
char mapp[maxn][maxn];
bool vis[maxn][maxn];
int pp,qq;
int X,Y;
/**L,W**/
bool flag[2];
struct node
{
int x;
int y;
int st;
} p[maxn*maxn];
int n,m,res;
int step[4][2]= {
{0,-1},{0,1},{1,0},{-1,0}};
void bfs()
{
int xx,yy,st,x,y;
flag[0]=flag[1];//0-l
while(pp<qq)
{
st=p[pp].st+1;
xx=p[pp].x;
yy=p[pp].y;
for(int i=0; i<4; ++i)
{
x=xx+step[i][0];
y=yy+step[i][1];
if(x<0||x