F. Simple Cycles Edges
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
You are given an undirected graph, consisting of nn vertices and mm edges. The graph does not necessarily connected. Guaranteed, that the graph does not contain multiple edges (more than one edges between a pair of vertices) or loops (edges from a vertex to itself).
A cycle in a graph is called a simple, if it contains each own vertex exactly once. So simple cycle doesn't allow to visit a vertex more than once in a cycle.
Determine the edges, which belong to exactly on one simple cycle.
Input
The first line contain two integers nn and mm (1≤n≤100000(1≤n≤100000, 0≤m≤min(n⋅(n−1)/2,100000))0≤m≤min(n⋅(n−1)/2,100000)) — the number of vertices and the number of edges.
Each of the following mm lines contain two integers uu and vv (1≤u,v≤n1≤u,v≤n