摘要: Dungeon Master大意:给你一个三维的地图,可以上下左右前后的运动,求从‘S’到‘E’的对短距离。思路: 训练计划上说是DFS,敲着敲着发现敲不动了,就BFS了。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int Map[35][35][35]; 8 int s_x, s_y, s_z; 9 int b_x, b_y, b_z; 10 int e_x, e_y, e_z; 11 bool dis[35][35][35]; 12 int ans[300000]... 阅读全文
posted @ 2013-12-19 18:23 GLSilence 阅读(192) 评论(0) 推荐(0) 编辑