摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1180题意:中文。mark:题目没说明楼梯改变情况。sample中的路径应该是先向上走,再向右走,通过楼梯后走到头再向上,这里wa了1次。bfs+优先队列。优先队列用手写堆实现。数据规模很小。代码:# include <stdio.h># include <string.h>char graph[25][25] ;int dr[4][2] = {0,1,0,-1,1,0,-1,0} ;int sx, sy, ex, ey ;int vis[25][25] ;int q[25*25 阅读全文
posted @ 2012-01-20 04:52 Seraph2012 阅读(275) 评论(0) 推荐(0) 编辑