摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4568思路:首先spfa预处理出每对宝藏之间的最短距离以及宝藏到边界的最短距离,然后dp[state][u]表示当前在点u,状态为state的最短距离,然后更新就行。#include #include #... 阅读全文
posted @ 2014-10-06 12:36 ihge2k 阅读(224) 评论(0) 推荐(0) 编辑