It calculates the strongly connected components of directed graphs.
scc_graph graph(int n)
It creates a directed graph with vertices and edges.
Constraints
Complexity
void graph.add_edge(int from, int to)
It adds a directed edge from the vertex from
to the vertex to
.
Constraints
Complexity
vector<vector<int>> graph.scc()
It returns the list of the "list of the vertices" that satisfies the following.
Complexity