Now#2858

Now

1 sekunda
64 megabajtov
Lahko

In every sense, it's winter now. Only memories of the past could make us see things clearly.

— Is it really the end? — Who knows... — Well, let's get to work!

An undirected graph without loops or multiple edges is given. Find the size of the maximal matching, i.e., the maximum size of a subset of the graph's edges such that no vertex is incident to more than one edge from .

Vhod

The first line contains two integers (1 \leq N \leq 400) and (0 \leq K \leq N(N-1)/2) — the number of vertices and the number of edges in the graph, respectively. Each of the next lines contains two integers and describing an edge. The graph is guaranteed to be random.

Izhod

Output a single integer: the size of the maximal matching.

Primeri

Primer 1

Loading
Loading