Given a directed acyclic graph, your task is to partition the graph into the smallest number of vertex-disjoint paths. Each vertex must be included in exactly one path.
The first line provides two integers: the number of vertices and the number of edges . The constraints are 1 \le n \le 500 and 0 \le k \le n \cdot (n - 1) / 2. The next lines each contain two integers, and (where 1 \le a, b \le n), representing a directed edge from vertex to vertex . Each edge is unique and appears only once.
Print the minimum number of paths required.
Example 1