Given a tree, each node has a cost, find P node that are connected, and the sum of P node is minimum

Revision en1, by ErisSimp, 2023-08-06 13:10:09

Given a tree with n node, a number P, every node i has a c[i], print the minimum-sum of P node that are connected Help me with this problems.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ErisSimp 2023-08-06 13:10:09 243 Initial revision (published)