Problem H. Monkeys
时间限制 1000 ms
内存限制 149.83203125 MB
There is a tree having N vertices. In the tree there are K monkeys (K <= N). A vertex can be occupied by at most one monkey. They want to remove some edges and leave minimum edges, but each monkey must be connected to at least one other monkey through the remaining edges.
Print the minimum possible number of remaining edges.
输入数据
输出数据
For each test case, print the minimum possible number of remaining edges.
样例输入
样例输出
$ Mathjax font initiator $