![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bfs
leslie___
越努力越幸运
展开
-
牛客bfs:maze
传送门 这道题宜采用优先队列,详见注释 #include <iostream> #include <queue> #include <cstring> using namespace std; const int N = 303; const int M = 1010; char a[N][N];//存放maze int dir[4][2] = {{1,0},{...原创 2020-04-12 17:04:02 · 118 阅读 · 0 评论 -
牛客bfs:工厂流水线
传送门 思路:如果加工到一个组件的其中一个零件时所花的时间加上本身加工所需的时间是大于加工完其所需零件的时间,那么此工序关系就不成立 详细解释都在注释中 #include <iostream> #include <vector> using namespace std; struct machine { int start;/*到加工至这个零件所用的时间*/ ...原创 2020-04-10 17:30:33 · 473 阅读 · 0 评论