Problems
Paths in multigraph
Paths in multigraph
Given is an undirected multigraph G without loops. Write a program, which determines the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.
Input
The first line contains an integer n (2 ≤ n ≤ 100)- the number of vertices in G. The vertices of the multigraph G are numbered from 1 to n. The second line contains an integer m (0 ≤ m ≤ 3000) - the number of edges in G. The next m lines contain the endpoints u and v of the consecutive edge in multigraph G.
Output
Print the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.
Input example #1
2 3 1 2 1 2 1 2
Output example #1
3
Input example #2
3 2 1 2 2 3
Output example #2
1
Input example #3
3 1 1 2
Output example #3
0