hdoj 1242 Rescue (BFS)(二)

2015-07-20 17:07:23 · 作者: · 浏览: 9
time;
}
}
}
}




int main()
{
while(~scanf("%d%d",&n,&m))
{
int i,j;
for(i=0;i
scanf("%s",map[i]);

init();
BFS();
if(cost[end_x][end_y]==-1)
printf("Poor ANGEL has to stay in the prison all his life.\n");
else
printf("%d\n",cost[end_x][end_y]);

}
return 0;
}