题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2680
题目中说的是终点固定,起点发生变化,那么可以反向构造图,这样一次Dij就能算出所有结果了。(刚开始用的深搜+DP超时了...)
AC代码 https://github.com/Kiritow/OJ-Problems-Source/blob/master/HDOJ/2680.cpp
欢迎加入OJ-Source-Project On GitHub: https://github.com/Kiritow/OJ-Problems-Source