Permutation Counting 2 - MarisaOJ: Marisa Online Judge

Permutation Counting 2

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of permutations $P_1,P_2,...,P_n$ of integers from $1$ to $n$ such that $|P_i - i| \ge X$ for every $i$. ### Input - A single line containing two integers $n$ and $X$. ### Output - Print an integer representing the count of permutations satisfying the conditions, modulo $998244353$. ### Constraints - $1 \le n \le 100$. - $1 \le X \le 5$. ### Example Input: ``` 5 2 ``` Output: ``` 4 ```