给定一个有向图和两点 s,ts,ts,t,保证无自环,可以有重边。每一条边 eee 都有其初始长度 ded_ede 和费用 cec_ece。可以花费 xcexc_exce 的代价将 eee 的长度改为 de+xd_e+xde+x,其中 x∈R+x\in R^+x∈R+。给定 PPP,用不超过 PPP 的代价最长化 sss 到 ttt 的最短路。求这个最短路。
n≤200,m≤2000,P≤106n\le 200, m\le 2000, P\le 10^6n≤200,m≤2000,P≤106
di,ci≤10d_i,c_i\le 10di,ci≤10
使用您的 gxyz 通用账户