A city has n intersections joined by n-1 two-way streets. Using only these streets you can travel from any intersection to any other one.
Mirek delivers newspapers in this city. Every street has a known number of residents, and that number is also the number of newspapers he has to deliver on that street. Each day he picks two intersections and visits every house on the shortest route between them. His daily pay is proportional to the average number of newspapers delivered per street, that is, the number of delivered newspapers divided by the number of streets he walks.
At first Mirek picked a route made of the single street with the most residents. His boss noticed and added one rule, because too many people were getting no newspaper: the route has to use at least k streets.
Find the largest average number of newspapers delivered per street over all routes that use at least k streets.