[ABC137d&e]RE

$E$

对每条边减$p$,是否存在和为正的环,且能到终点。

对每条边的权值取反,找负环

从$1$,$n$各跑一遍若都有负环即存在

原文地址:https://www.cnblogs.com/lxzl/p/11333951.html