시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 36 | 33 | 29 | 90.625% |
Given is an undirected multigraph G without loops.
Write a program disconnect, which determines the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.
The first line of the standard input contains an integer n – the number of vertices in G. The vertices of the multigraph G are numbered from 1 to n. The second line of the standard input contains an integer m – the number of edges in G. The next m lines of the standard input contain the endpoints u and v of the consecutive edge in multigraph G.
The only line of the standard output has to contain one integer – the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.
2 3 1 2 1 2 1 2
3
3 2 1 2 2 3
1
3 1 1 2
0