Bertown roads
HardRating 2000CodeforcesGraph Theory (MST, SCC, Bridges)
Approach hintTry it first, then revealHide
A strongly connected orientation exists exactly when the graph has no bridge. If there is none, orient DFS tree edges away from the root and back edges toward the ancestor; low-links in the same DFS detect bridges.