Connection Points 2
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given an undirected graph, your task is to identify all the articulation points within it.
Input
The first line contains two natural numbers, n and m, representing the number of vertices and edges in the graph, respectively (n ≤ 620,000, m ≤ 6,200,000). The following m lines each describe an edge with two natural numbers b[i]
and e[i]
(1 ≤ b[i]
, e[i]
≤ n), which are the endpoints of the edge.
Output
First, output the number of articulation points b in the graph. Then, on the next line, list b integers representing the vertex numbers that are articulation points, sorted in ascending order.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 33%