Official algorithmic problem description and constraints.
You are given a tree with π vertices.
Your task is to find the maximum number π₯ such that it is possible to remove exactly π edges from this tree in such a way that the size of each remaining connected component is at least π₯.
Detailed video explanations, mathematical intuition, and clean C++ implementation code.