Description One day, Takahashi was given the following problem from Aoki: You are given a tree with N vertices and an integer K. The vertices are numbered 1 through N. The edges are represented by pairs of integers (ai,bi). For a set S of vertices in…
[atcoder contest 010] F - Tree Game Time limit : 2sec / Memory limit : 256MB Score : 1600 points Problem Statement There is a tree with N vertices, numbered 1 through N. The i-th of the N−1 edges connects vertices ai and bi. Currently, there are Ai s…