Problem Link #include <iostream> #include <vector> #include <set> using namespace std; const int N = 10001; vector<int> graph[N]; set<int> res; int parent[N], dis[N], low[N]; bool visited[N]; int n, m, u, v, value; void dfs(int source) { int dest, children; children = 0; visited[source] = true; dis[source] = low[source] = ++value; for(int i = 0; i < graph[source].size(); i++) { dest = graph[source][i]; if(!visited[dest]) { children++; ...