文章
277
粉丝
20
获赞
732
访问
148.1k
#include<bits/stdc++.h>
using namespace std;
char dir[4]={'U','R','D','L'};
const int maxn=15;
char mp[maxn][maxn];
int vis[maxn][maxn];
bool move(int x,int y,char loc,int w,int h){//判断能否移动
if(loc=='U'){
x=x-1;
y=y;
}else if(loc=='D'){
x=x+1;
y=y;
}else if(loc=='L'){
x=x;
y=y-1;
}else if(loc=='R'){
x=x;
y=y+1;
&...
登录后发布评论
暂无评论,来抢沙发