P11075 Inequality Relations (Enhanced Version).
Background
This problem is an enhanced version of [Inequality Relations](https://loj.ac/p/575). It is recommended that you solve the original problem before challenging this enhanced version.
Description
Given a string $s_1,s_2,\cdots ,s_n$ consisting only of the two characters ``.
Let $f(s)$ be the number of permutations $p_1,p_2,\cdots ,p_{n+1}$ such that $p_i
Input Format
One line containing a positive integer $n$.
Output Format
One line containing an integer, representing the number of permutations satisfying the requirement modulo $998244353$.
Explanation/Hint
### Sample Explanation
For the string $s1=$ ``, there is exactly one permutation $(2,1)$ that satisfies the requirement, so $f(s2)=1$.
Therefore, the answer is $f(s1)+f(s2)=2$.
### Constraints
| Test Point ID | $n=$ |
| :----------: | :----------: |
| $1$ | $1$ |
| $2$ | $2$ |
| $3$ | $3$ |
| $4$ | $5$ |
| $5$ | $10$ |
| $6$ | $15$ |
| $7$ | $20$ |
| $8$ | $30$ |
| $9$ | $50$ |
| $10$ | $100$ |
For all testdata, it is guaranteed that $1\le n\le 100$.
Translated by ChatGPT 5