标签:possible main while bit print space bool scan ssi
#include<bits/stdc++.h> using namespace std; int n,m,bx,by,cs; int mp[25][25]; int dx[]={0,1,-1,0},dy[]={1,0,0,-1}; void bfs1(int sx,int sy,int tx,int ty){ } bool bfs(int sx,int sy,int tx,int ty){ } void print(){ } void solve(){ for(int i=1;i<=n;++i)scanf("%s", s[i]+1),fill(mp+1,mp+n+1,0); for(int i=1;i<=n;++i) for(int j=1;j<=m;++j) if(s[i][j]==‘S‘)sx=i,sy=j; else if(s[i][j]==‘B‘)bx=i,by=j; else if(s[i][j]==‘T‘)tx=i,tx=j; else if(s[i][j]==‘#‘)mp[i][j]=1; printf("Maze #%d\n",++cs); if(!bfs())puts("impossible"); else print(),puts(""); } int main(){ while(cin>>n>>m&&n&&m)solve(); }
标签:possible main while bit print space bool scan ssi
原文地址:https://www.cnblogs.com/coder-cjh/p/11668125.html