摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4114思路:首先是floyd预处理出任意两点之间的最短距离。dp[state1][state2][u]表示在该状态state1(已经访问过的景点)、state2(手中有的景点的票)、目前所在的位置时所花费的时间的最小值,于是答案就是dp[(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define inf 1<<30 9 #define FILL(a,b) memset 阅读全文
posted @ 2013-10-12 20:07 ihge2k 阅读(564) 评论(0) 推荐(1) 编辑