https://vj.imken.moe/contest/598718#problem/L
考虑一个奇妙的转化:
有很多 inf \inf inf个人要走 n n n 扇门,第 i i i 扇只能走 inf a − i \inf_a-i infa−i 个人,有 m m m 个通道,可以把一个人从 s i s_i si 运到 t i + 1 t_i+1 ti+1,但要给 c i c_i ci 的钱,求所有人到达终点的最小代价。
然后直接流即可。
https://vj.imken.moe/contest/598718#problem/L
考虑一个奇妙的转化:
有很多 inf \inf inf个人要走 n n n 扇门,第 i i i 扇只能走 inf a − i \inf_a-i infa−i 个人,有 m m m 个通道,可以把一个人从 s i s_i si 运到 t i + 1 t_i+1 ti+1,但要给 c i c_i ci 的钱,求所有人到达终点的最小代价。
然后直接流即可。