#include #include #include #include using namespace std; const int maxk=1e5+10; int n, m; vectorgraph[maxk]; vectorart; int low_link[maxk]; int dist[maxk]; bool visited[maxk]; int current_time=0; void dfs(int node, int parent=-1){ visited[node]=true; low_link[node]=current_time; dist[node]=current_time; current_time++; int children = 0; for(int i=0; i<(int)graph[node].size(); i++){ int sosed=graph[node][i]; if(sosed!=parent){ if(visited[sosed]==true){ low_link[node]=min(low_link[node], dist[sosed]); } else{ dfs(sosed, node); low_link[node]=min(low_link[node], low_link[sosed]); if(parent!=-1 and low_link[sosed]>=dist[node]){ art.push_back(node); } children++; } } } if(parent == -1 and children > 1) { art.push_back(node); } } void articulation_points(){ for(int i=0; i>n>>m; if(n == 0 and m == 0) { break; } for(int i=0; i>a>>b; a--; b--; graph[a].push_back(b); graph[b].push_back(a); } current_time=0; articulation_points(); cout<