SP6917 XYYHHTT - Catch Sheep
Description
XiYangYang is a kind of lovely and rare sheep. They live in a peaceful land which can be describled as a tree with N cities (nodes).
Now you have K robots. They will start at a same point and travel each edge at least once so that all XiYangYang will be caught. All your robots can stop at any city in the land. Because of expensive oil, you want minimize the total distance that your robots walk.
Input Format
First line : N K ( N
Output Format
N lines: The total distance that your robots walk if they all start at city i