{"problem":{"name":"Banned X","description":{"content":"Find the number, modulo $998244353$, of sequences of length $N$ consisting of $0$, $1$ and $2$ such that none of their contiguous subsequences totals to $X$.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"tenka1_2019_f"},"statements":[{"statement_type":"Markdown","content":"Find the number, modulo $998244353$, of sequences of length $N$ consisting of $0$, $1$ and $2$ such that none of their contiguous subsequences totals to $X$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 3000$\n*   $1 \\leq X \\leq 2N$\n*   $N$ and $X$ are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $X$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"tenka1_2019_f","tags":[],"sample_group":[["3 3","14\n\n$14$ sequences satisfy the condition: $(0,0,0),(0,0,1),(0,0,2),(0,1,0),(0,1,1),(0,2,0),(0,2,2),(1,0,0),(1,0,1),(1,1,0),(2,0,0),(2,0,2),(2,2,0)$ and $(2,2,2)$."],["8 6","1179"],["10 1","1024"],["9 13","18402"],["314 159","459765451"]],"created_at":"2026-03-03 11:01:14"}}