시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB36332990.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 ≤ n ≤ 100
  • 0 ≤ m ≤ 3000

예제 입력 1

2
3
1 2
1 2
1 2

예제 출력 1

3

예제 입력 2

3
2
1 2
2 3

예제 출력 2

1

예제 입력 3

3
1
1 2

예제 출력 3

0