asdff
2026-11-21 11:02:54
发布于:广东
#include<bits/stdc++.h>
using namespace std;
char MAP[49][49];
bool vis[49][49];
struct node{
int x,y,step;
};
int dir[4][2]={{-1,0},{0,1},{1,0},{0,-1}};
int main(){
int R,C;
cin>>R>>C;
for(int i=1;i<=R;i++){
for(int j=1;j<=C;j++){
cin>>MAP[i][j];
}
}
queue<node> q;
q.push({1,1,0});
vis[1][1]=1;
while(){
node now=q.front();
q.pop();
if(){
cout<<now.step;
break
}
}
return 0;
}
这里空空如也


















有帮助,赞一个