Alice wants to know the number of connected components with a size of three in the tree.
Given a tree with n n nodes numbered from 1 1 to n n. Alice wants to know the number of connected components with a size of three in the tree.
(图片来源网络,侵删)
Alice wants to know the number of connected components with a size of three in the tree.
Given a tree with n n nodes numbered from 1 1 to n n. Alice wants to know the number of connected components with a size of three in the tree.