eolymp
bolt
Try our new interface for solving problems
Məsələlər

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.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
3 3
1 2
2 3
3 1
Çıxış verilənləri #1
2
Mənbə III International Summer School Programming in Sevastopol 2012