AT_arc230_a [ARC230A] Meeting on Tree

Description

You are given a tree with $ N $ vertices numbered $ 1,2,\dots, N $ . For $ i=1,2,\dots, N-1 $ , the $ i $ -th edge connects vertices $ u_i $ and $ v_i $ . There is one squirrel at each vertex of the tree. The squirrels are trying to hold a meeting as follows. 1. Choose one or more squirrels to participate in the meeting. 2. The chosen squirrels consult with each other and choose one vertex of the tree as the venue for the meeting. 3. Each of the chosen squirrels moves along the edges of the tree until it reaches the venue. A squirrel's movement incurs a cost equal to the number of edges it traverses. We define the cost of the meeting as the sum of the movement costs of the chosen squirrels. The squirrels want to choose the venue of the meeting so that the cost of the meeting is minimized. There are $ 2^N-1 $ ways to choose one or more squirrels to participate in the meeting. Find the sum, modulo $ 998244353 $ , over all of these ways, of the minimum cost of the meeting when the venue is chosen appropriately.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ u_1 $ $ v_1 $ $ u_2 $ $ v_2 $ $ \vdots $ $ u_{N-1} $ $ v_{N-1} $

Output Format

Output the answer.

Explanation/Hint

### Sample Explanation 1 For example, if the squirrels at vertices $ 1,2,3 $ participate in the meeting, it is appropriate to choose vertex $ 1 $ as the venue, and the cost in this case is $ 2 $ . The sum, over all $ 2^4-1=15 $ ways of choosing the squirrels, of the minimum cost of the meeting when the venue is chosen appropriately is $ 21 $ . ### Constraints - $ 2\le N\le 3\times 10^5 $ - $ 1\le u_i,v_i\le N $ - The given graph is a tree. - All input values are integers.