摘要: 解救人质,给一张二维地图,有障碍的点不能移动,给定起始点和人质坐标,求到达人质路程的最短路程,DFS模型#include #include using namespace std;int n,m,p,q,Min=99999999;int a[51][51],book[51][51];void dfs... 阅读全文
posted @ 2016-07-29 20:52 Lawliet__zmz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=8&problem=620&mosmsg=Submission+received+with+ID+1775... 阅读全文
posted @ 2016-07-29 18:45 Lawliet__zmz 阅读(147) 评论(0) 推荐(0) 编辑
摘要: //小哈面前有三个箱子,手上有1,2,3三张牌,规定能放小牌就放小牌,小哈放完最后一个箱子后,最后在箱子的牌能有几种排列?#include #include using namespace std;int a[10],book[10],n;void dfs(int step) //step表示站在第... 阅读全文
posted @ 2016-07-29 16:01 Lawliet__zmz 阅读(362) 评论(0) 推荐(0) 编辑