{"problem":{"name":"Ex - Diff Adjacent","description":{"content":"A positive-integer sequence is said to be **splendid** if no two adjacent elements are equal. Find the sum, modulo $998244353$, of the lengths of all splendid sequences whose elements have a sum of $N","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":4000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc297_h"},"statements":[{"statement_type":"Markdown","content":"A positive-integer sequence is said to be **splendid** if no two adjacent elements are equal.\nFind the sum, modulo $998244353$, of the lengths of all splendid sequences whose elements have a sum of $N$.\n\n## Constraints\n\n*   $1 \\le N \\le 2 \\times 10^5$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc297_h","tags":[],"sample_group":[["4","8\n\nThere are four splendid sequences whose sum is $4$: $(4),(1,3),(3,1),(1,2,1)$. Thus, the answer is the sum of their lengths: $1+2+2+3=8$.\n$(2,2)$ and $(1,1,2)$ also have a sum of $4$ but ineligible because their $1$\\-st and $2$\\-nd elements are the same."],["297","475867236"],["123456","771773807"]],"created_at":"2026-03-03 11:01:14"}}