{"problem":{"name":"ABS Permutation (Count ver.)","description":{"content":"Find the number of permutations $P=(P_1,P_2,\\dots,P_N)$ of $(1,2,\\dots,N)$ that satisfy the following, modulo $998244353$, for each $K=0,1,2,\\dots,N-1$. *   There are exactly $K$ integers $i$ such th","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":8000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc140_f"},"statements":[{"statement_type":"Markdown","content":"Find the number of permutations $P=(P_1,P_2,\\dots,P_N)$ of $(1,2,\\dots,N)$ that satisfy the following, modulo $998244353$, for each $K=0,1,2,\\dots,N-1$.\n\n*   There are exactly $K$ integers $i$ such that $1 \\le i \\le N-1$ and $|P_i - P_{i+1}|=M$.\n\n## Constraints\n\n*   $2 \\le N \\le 250000$\n*   $1 \\le M \\le N-1$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc140_f","tags":[],"sample_group":[["3 1","0 4 2 \n\n*   For $K=0$, the condition is satisfied by no permutations $P$.\n*   For $K=1$, the condition is satisfied by four permutations $P$: $(1,3,2),(2,1,3),(2,3,1),(3,1,2)$.\n*   For $K=2$, the condition is satisfied by two permutations $P$: $(1,2,3),(3,2,1)$."],["4 3","12 12 0 0"],["10 5","1263360 1401600 710400 211200 38400 3840 0 0 0 0"]],"created_at":"2026-03-03 11:01:13"}}