Example 1

Example 2

1 <= n <= 200n - 1 <= roads.length <= n * (n - 1) / 2roads[i].length == 30 <= ui, vi <= n - 11 <= timei <= 109ui != viThere is at most one road connecting any two intersections.You can reach any intersection from any other intersection.Example 1

Example 2

1 <= n <= 200n - 1 <= roads.length <= n * (n - 1) / 2roads[i].length == 30 <= ui, vi <= n - 11 <= timei <= 109ui != viThere is at most one road connecting any two intersections.You can reach any intersection from any other intersection.