AAA gets a complete graph of 2n2n2n vertices, where every pair of distinct vertices is connected by a unique edge, as a birthday present. However, AAA thinks the complete graph is not that beautiful and he decides to delete 2n12n-12n1 edges that form a tree. Now he wonders the number of different perfect matchings in the remaining graph. Note that a perfect matching is a set of nnn edges where no two edges share a common vertex. Since the answer may be very large, you only need to output the answer modulo 998244353998,244,353998244353.
AAA gets a complete graph of 2n2n2n vertices, where every pair of distinct vertices is connected by a unique edge, as a birthday present. However, AAA thinks the complete graph is not that beautiful and he decides to delete 2n−12n-12n−1 edges that form a tree. Now he wonders the number of different perfect matchings in the remaining graph. Note that a perfect matching is a set of nnn edges where no two edges share a common vertex. Since the answer may be very large, you only need to output the answer modulo 998 244 353998,244,353998244353.
标签: HBC230859[HAOI2008]硬币购物 容斥原理与鸽巢原理 排列组合Perfect Matchings题解