摘要: ps:代码对应的题目是杭电1874 flyod算法: 对于起点与终点,引入第三点p,d[s][t]=min(d[s][t],d[s][p]+d[p][t]); 代码://k为引入点 1 for(int i=0;i<=n;i++) 2 for(int j=0;j<=n;j++) 3 if(i==j)d 阅读全文
posted @ 2016-04-16 13:34 weeping 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.hdu.edu.cn/status.php?user=Honor&pid=1874&status=5 题目: Problem Description 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方 阅读全文
posted @ 2016-04-16 13:27 weeping 阅读(204) 评论(0) 推荐(0) 编辑