Ban Permutation

AtCoder
IDabc309_g
Time2000ms
Memory256MB
Difficulty
Find the number, modulo $998244353$, of permutations $P=(P_1,P_2,\dots,P_N)$ of $(1,2,\dots,N)$ such that: * $|P_i - i| \ge X$ for all integers $i$ with $1 \le i \le N$. ## Constraints * $1 \le N \le 100$ * $1 \le X \le 5$ * All input values are integers. ## Input The input is given from Standard Input in the following format: $N$ $X$ [samples]
Samples
Input #1
3 1
Output #1
2

The conforming permutations $P=(P_1,P_2,P_3)$ are the following two, $(2,3,1)$ and $(3,1,2)$, so the answer is $2$.
Input #2
5 2
Output #2
4
Input #3
98 5
Output #3
809422418
API Response (JSON)
{
  "problem": {
    "name": "Ban Permutation",
    "description": {
      "content": "Find the number, modulo $998244353$, of permutations $P=(P_1,P_2,\\dots,P_N)$ of $(1,2,\\dots,N)$ such that: *   $|P_i - i| \\ge X$ for all integers $i$ with $1 \\le i \\le N$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc309_g"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number, modulo $998244353$, of permutations $P=(P_1,P_2,\\dots,P_N)$ of $(1,2,\\dots,N)$ such that:\n\n*   $|P_i - i| \\ge X$ for all integers $i$ with $1 \\le i \\le N$.\n\n## Constraints\n\n*   $1 \\le...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments