See the original article https://dyingdown.github.io/2019/11/21/AtCoder-5633-Counting-of-Trees/
Counting of Trees
Problem Statement
Given is an integer sequence D 1 , D 2 , ⋯ , D N D_1, D_2, \cdots, D_N D1,D2,⋯,DN of N elements. Find the number, modulo 998244353, of trees with N N N vertices numbered 1 to N that satisfy the following condition:
- For every integer i