Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 16M

Problem type

Given: an undirected graph.
How many edges must you remove to make it a tree? (Or a forest of trees?)

Input Specification

As usual. N \le 1\,000.

Output Specification

The minimum number of edges you have to remove.

Sample Input

0 1 1
1 0 1
1 1 0

Sample Output



There are no comments at the moment.