摘要: 题意:给定原图顶点间的最短路,问原图最少有几条边。分析:若两点的距离可由另外两条边来代替,则可删去该边;若存在比这两点的距离更短的路径,则“impossible”.View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #include <cstdlib> 7 #include <iostream> 8 #include <cmath> 9 #include <cstring>10 #include <algorithm>11 #i 阅读全文
posted @ 2012-09-24 10:55 發_ 阅读(131) 评论(0) 推荐(0) 编辑