Given a tree with n nodes, the points have power
Find the number of point pairs (x,y)
where x!=y , the difference between the maximum value and the minimum value on the path from x to y
Given a tree with n nodes, the points have power
Find the number of point pairs (x,y)
where x!=y , the difference between the maximum value and the minimum value on the path from x to y