Олимпиадный тренинг

Задача 21708. articulation points


Задача

Темы:
 
You are given an undirected connected graph with N vertices and M edges (1 ? N ? 20000, 1 ? M ? 200,000). There are no loops or multiple edges in the graph.
 
Find all articulation points in the given graph.
 
Input file format:
The graph is given in the input file as follows: the first line contains the numbers N and M. Each of the following M lines contains a description of the edge - two integers from the range from 1 to N - the numbers of the ends of the edge.
 
Output file format:
On the first line print number C - the number of articulation points in the given graph. On the next line print From integers - the numbers of vertices that are articulation points, in ascending order.