DP:
背包:https://www.luogu.com.cn/problemnew/solution/P1616
图论:
SPFA:http://www.sohu.com/a/244179200_100201031