摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2066 一个人的旅行 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Tot... 阅读全文
posted @ 2015-08-12 20:46 编程菌 阅读(163) 评论(0) 推荐(0) 编辑
摘要: SPFA 求单源最短路的SPFA算法的全称是:Shortest Path Faster Algorithm 从名字我们就可以看出,这种算法在效率上一定有过人之处。很多时候,给定的图存在负权边,这时类似Dijkstra等算法便没有了用武之地,而Bellman-Ford算法的复杂度又过高,SPF... 阅读全文
posted @ 2015-08-12 16:58 编程菌 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2120 【题目大意】 富裕的女王 要给ACMER分地,女王的土地中有很多瞭望塔,女王命令下人在瞭望塔(watchtower) 与瞭望塔之间建立笔直的围墙,被围墙圈起来的土地可以用来奖励ACMER,... 阅读全文
posted @ 2015-08-12 16:18 编程菌 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3371 Connect the Cities Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Ja... 阅读全文
posted @ 2015-08-12 15:50 编程菌 阅读(139) 评论(0) 推荐(0) 编辑