主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
AlbertTuring
2023年6月29日 10:47
C++简单模拟
P1675
回复 1
|
赞 2
|
浏览 883
简单模拟 #include<iostream> #include<cstring> using namespace std; const int N = 20; char map[N][N]; bool st[N][N]; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1}; int main() { int n,m; while(cin>>n>>m) { memset(map,'*',siz...
930254841
2022年5月30日 09:23
方向导航的BFS
P1675
回复 0
|
赞 1
|
浏览 5.2k
思路:定义结构体存放位置坐标以及方向。按照方向进行BFS,遇到边界或者陷阱或者已访问的节点,则向右转。 #include <bits/stdc++.h> using namespace std; typedef struct node { int x, y; char order; node() {} node(int x, int y, char order) { this->x = x; this->y = y; this-&...
ccxx123
2021年1月28日 16:34
C语言解法
P1675
回复 0
|
赞 0
|
浏览 7.6k
#include<stdio.h> typedef struct mg { char s; int flag; }mg; typedef struct dir { int x; int y; }dir; int main() { int w, h; int nextx, nexty; int...
ccxx123
2021年1月28日 16:34
C语言解法
P1675
回复 0
|
赞 0
|
浏览 6.5k
#include<stdio.h> typedef struct mg { char s; int flag; }mg; typedef struct dir { int x; int y; }dir; int main() { int w, h; int nextx, nexty; int...
题目
机器人走迷宫
题解数量
4
发布题解
热门题解
1
C++简单模拟
2
方向导航的BFS
3
C语言解法
4
C语言解法