Pak Chanek has a tree called the key tree. This tree consists of $$$N$$$ vertices and $$$N-1$$$ edges. The edges of the tree are numbered from $$$1$$$ to $$$N-1$$$ with edge $$$i$$$ connecting vertices $$$U_i$$$ and $$$V_i$$$. Initially, each edge of the key tree does not have a weight.
Formally, a path with length $$$k$$$ in a graph is a sequence $$$[v_1, e_1, v_2, e_2, v_3, e_3, \ldots, v_k, e_k, v_{k+1}]$$$ such that:
A circuit is a path that starts and ends on the same vertex.
A path in a graph is said to be simple if and only if the path does not use the same edge more than once. Note that a simple path can use the same vertex more than once.
The cost of a simple path in a weighted graph is defined as the maximum weight of all edges it traverses.
Count the number of distinct undirected weighted graphs that satisfy the following conditions:
Print the answer modulo $$$998\,244\,353$$$.
Two graphs are considered distinct if and only if there exists a triple $$$(a, b, c)$$$ such that there exists an edge that connects vertices $$$a$$$ and $$$b$$$ with weight $$$c$$$ in one graph, but not in the other.
The first line contains a single integer $$$N$$$ ($$$2 \le N \le 10^5$$$) — the number of vertices in the key tree.
The $$$i$$$-th of the next $$$N-1$$$ lines contains two integers $$$U_i$$$ and $$$V_i$$$ ($$$1 \le U_i, V_i \le N$$$) — an edge connecting vertices $$$U_i$$$ and $$$V_i$$$. The graph in the input is a tree.
An integer representing the number of distinct undirected weighted graphs that satisfy the conditions of the problem modulo $$$998\,244\,353$$$.
4 3 2 1 3 4 3
540
The following is an example of a graph that satisfies.
The following is an assignment of edge weights in the key tree that corresponds to the graph above.
As an example, consider a pair of vertex indices $$$(1, 4)$$$.
Name |
---|