#icpc2015autumnj. [icpc2015autumn_j]Longest Shortest Path

[icpc2015autumn_j]Longest Shortest Path

给定一个有向图和两点 s,ts,t,保证无自环,可以有重边。每一条边 ee 都有其初始长度 ded_e 和费用 cec_e。可以花费 xcexc_e 的代价将 ee 的长度改为 de+xd_e+x,其中 xR+x\in R^+。给定 PP,用不超过 PP 的代价最长化 sstt 的最短路。求这个最短路。

n200,m2000,P106n\le 200, m\le 2000, P\le 10^6

di,ci10d_i,c_i\le 10