Useful Edges Codeforces Round #709 Div. 2 Solution

Useful Edges Codeforces Solution You are given a weighted undirected graph on nn vertices along with qq triples (u,v,l)(u,v,l), where in each triple uu and vv are vertices and ll is a positive integer. An edge ee is called useful if there is at least one triple (u,v,l)(u,v,l) and a path (not necessarily simple) with the following properties: Useful Edges solution codeforces uu and vv are the endpoints of this path, ee is one of the … Read more