摘要: 1, HDU 1548A strange lift :http://acm.hdu.edu.cn/showproblem.php?pid=1548这道题可以灰常巧妙的转换为一道最短路题目,对第i层,按钮数字为button[i],则如果满足相加=1,则把i到i-button[i]的路径长度设为1.则最后输出终点的最短路的长度即可#include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;int n,a,b;int map[210][210],vis[210],dis[210];int SPFA(){ . 阅读全文
posted @ 2013-07-01 09:05 Jack Ge 阅读(278) 评论(0) 推荐(0)