CF1248F CF1249F Maximum Weight Subset(트리 DP or 욕심) Recall that the distance between two vertices in the tree is the number of edges on a simple path between them. Input The first line of the input contains two integers n and k (1≤n,k≤200) — the number of vertices in the ... DPCF1248F나무 DP/욕심
CF1249F Maximum Weight Subset(트리 DP or 욕심) Recall that the distance between two vertices in the tree is the number of edges on a simple path between them. Input The first line of the input contains two integers n and k (1≤n,k≤200) — the number of vertices in the ... DPCF1248F나무 DP/욕심