摘要: 题意就是求最短路,唯一不同之处就是,中间有一条路可以之花费一半的代价。解题方法就是两次求最短路(起点到各点,终点到各点),之后枚举每条边。每条边有两个端点,所以有两种可能。View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 using namespace std; 5 const int MAX=1005; 6 const int INF=12345674; 7 int N,n; 8 int sdist[MAX],vist[MAX],tdist[MAX]; 9 阅读全文
posted @ 2012-04-25 17:30 我们一直在努力 阅读(189) 评论(0) 推荐(0) 编辑