Given a tree with N nodes, node i-th has c[i] (let say it mean node i-th cost), find P (P is given) node that are connected, and the sum of P node's cost is minimum N<=100000 P<=N C[i]<=100000 output sum of P node's cost (i don't speak english so sorry if it bad)