http://acm.hdu.edu.cn/showproblem.php?pid=1535 spfa,根据题意需要将单向图正向算一遍从1到其余点的最短距离再反向来一遍,难在相处题意。 #include<bits/stdc+……