"Paradigm Cup" 2023 Nowcoder Summer Multi-School Training Camp 1 K-Subdivision
AI Translated from Chinese Problem Problem Statement Given a tree, for each node, consider the maximum value d such that after removing d edges, the node can still reach at least one other node. Compute the sum of these d values across all nodes. Input The first line contains an integer n (1 ≤ n ≤ 2×10^5), the number of nodes in the tree. The next n-1 lines contain edges of the tree. ...

