文章

277

粉丝

20

获赞

732

访问

148.1k

头像
机器人走迷宫 题解:
P1675 中南大学/中山大学机试题
发布于2026年3月14日 13:21
阅读数 31

#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;
 &...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发