| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 6 초 | 2048 MB | 0 | 0 | 0 | 0.000% |
In Treeland, a judicial reform is being carried out: the government needs to choose a new judicial hierarchy. The hierarchy will consist of $n$ judges conveniently labeled by integers from 1ドル$ to $n$.
The judicial hierarchy is a rooted labeled tree, and its vertices are the judges. Each judge has an ordered list of direct subordinates: child nodes in the rooted tree. Additionally, each judge in the judicial hierarchy is either reliable or unreliable.
The judicial hierarchy is called fair if the following is true for each judge: among him and all of his direct subordinates, at least half are reliable.
Two judicial hierarchies are considered different if at least one of three conditions holds true:
You can check the notes section to better understand these conditions.
Government wants to choose a fair judicial hierarchy by going through all the possible options. In order to assess the scale of the work, they need to know how many different fair judicial hierarchies exist. Calculate this number modulo 998ドル,244円,353円$.
The first line contains a single integer $n$ (1ドル \le n \le 2 \cdot 10^5$): the number of judges in the hierarchy.
Print a single integer: the number of different fair judicial hierarchies with $n$ judges modulo 998ドル,244円,353円$.
1
1
3
24
5
3190
100
413875584
Below are some examples of judicial hierarchies to clarify the conditions.
The direct subordinates of each judge are placed below the judge, from left to right.
Reliable judges are gray, and unreliable judges are white.
These two fair hierarchies are considered the same:
These four are all different: