시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 0 0 0 0.000%

문제

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.

Constraints

  • 2 ≤ n ≤ 100
  • 0 ≤ m ≤ 3000

출력

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.

예제 입력 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

힌트