eolymp
bolt
Try our new interface for solving problems
Problems

Edges removal

Edges removal

The undirected graph without loops and multiple edges is given. Remove the minimum number of edges to make a graph disconnected. \InputFile Two numbers \textbf{n} and \textbf{k} (\textbf{2} ≤ \textbf{n} ≤ \textbf{100}, \textbf{0} ≤ \textbf{k} ≤ \textbf{n·(n-1)/2}) - the number of vertices and edges in a graph. Then given \textbf{k} lines, each contains two numbers - \textbf{a} and \textbf{b} (\textbf{1} ≤ \textbf{a}, \textbf{b} ≤ \textbf{n}) - the numbers of the vertices, connected with an edge. \OutputFile One number - the minimum number of edges to make a graph disconnected.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3 3
1 2
2 3
3 1
Output example #1
2
Source III International Summer School Programming in Sevastopol 2012