UVa 610

In this problem you are given a undirected graph and you have to convert it into a directed graph, but the condition is in final graph there should be a path between any two node {u , v}. It doesn't matter whether the path is longest or shortest.

Gotchas

 * What if there is an back - edge?
 * What is there is an tree - edge?

Implementations

 * C++ Implementations : https://github.com/offamitkumar/UVA--Online-Judge/blob/master/Problem%20610/p610.cpp

Optimizations
Just Use Standard Bridge-Finding Algorithm, No further optimization needed.

Input
7 10 1 2 2 4 4 3 4 1 4 5 3 2 3 1 5 6 5 7 6 7 0 0

Output
1

1 2 2 4 4 3 3 2 3 1 4 1 4 5 5 6 6 7 7 5 5 4

Contributor
"Amit Kumar (talk) 13:52, 7 April 2020 (UTC)"

Categories here, use the form, see Categories for a list