eolymp
bolt
Try our new interface for solving problems
Problems

Articulation Points

Articulation Points

The undirected graph is given. Find all its articulation points. \InputFile The first line contains two positive integers $n$ and $m~(n \le 2 \cdot 10^4, m \le 2 \cdot 10^5)$ --- the number of vertices and edges respectively. Each of the next $m$ lines contains the description of an edge. The edge number $i$ is given with two positive integers $b_i, e_i~(1 \le b_i, e_i \le n)$ --- the numbers of the vertices it connects. \OutputFile Print in the first line the number $b$ of articulation points in a given graph. In the next $b$ lines print the numbers of the vertices that are articulation points in increasing order. \includegraphics{https://static.e-olymp.com/content/92/92fc0a17b41de363198e204b09e680ce3e6cd2e9.gif}
Time limit 2 seconds
Memory limit 128 MiB
Input example #1
9 12
1 2
2 3
4 5
2 6
2 7
8 9
1 3
1 4
1 5
6 7
3 8
3 9
Output example #1
3
1
2
3
Author Vitaly Goldstein
Source Winter School, Kharkov, 2011, Day 9