We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这个解答,这里第75行的s[y]是在找树的重心时求出来的,是以x(假定的根)为根时每个子树的大小,并不是以真正的重心为根时的子树大小,所以这个s应该是错的,得要以pos为根重新求。可以在dfs的那个function里面求
验证过了,work中的S确实不能反映子树真正的大小
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
这个解答,这里第75行的s[y]是在找树的重心时求出来的,是以x(假定的根)为根时每个子树的大小,并不是以真正的重心为根时的子树大小,所以这个s应该是错的,得要以pos为根重新求。可以在dfs的那个function里面求
验证过了,work中的S确实不能反映子树真正的大小
The text was updated successfully, but these errors were encountered: