{"problem":{"name":"Functional Square Root","description":{"content":"You are given a formal power series $F(x) = \\sum_{i=0}^{N-1} f_i x^i$ over $\\mathbb{F} _ {998244353}$, where $N \\geq 2$ and $F(x) \\bmod{x^2} = x$. It can be proven that there exists a unique formal po","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":12000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"fps_24_x"},"statements":[{"statement_type":"Markdown","content":"You are given a formal power series $F(x) = \\sum_{i=0}^{N-1} f_i x^i$ over $\\mathbb{F} _ {998244353}$, where $N \\geq 2$ and $F(x) \\bmod{x^2} = x$.\nIt can be proven that there exists a unique formal power series $G(x) = \\sum_{i=0}^{N-1} g_i x^i$ over $\\mathbb{F} _ {998244353}$ such that:\n\n*   $G(G(x)) \\equiv F(x) \\pmod{x^N}$, and\n*   $G(x) \\bmod{x^2} = x$.\n\nYour task is to find this $G(x)$.\n\n## Constraints\n\n*   $2 \\leq N \\leq 8000$\n*   $f_0 = 0$\n*   $f_1 = 1$\n*   $0 \\leq f_i < 998244353$ for $2 \\leq i \\leq N-1$\n*   All input values are integers\n\n## Input\n\nThe input is given from standard input in the following format:\n\n$N$\n$f_0$ $f_1$ $\\dots$ $f_{N-1}$\n\n[samples]\n\n## Note\n\nThis problem is a **hard challenge intended for those who have finished all other problems and still have time left**.  \nThe score is set relatively low compared to its difficulty.  \nIf you have not solved the other problems yet, it is recommended to do those first.","is_translate":false,"language":"English"}],"meta":{"iden":"fps_24_x","tags":[],"sample_group":[["3\n0 1 4","0 1 2\n\n$G(x) = x + 2x^2$ satisfies the conditions."],["7\n0 1 766294629 440423913 59187619 725560240 585990756","0 1 882269491 824730961 772850352 694658399 134447547"]],"created_at":"2026-03-03 11:01:14"}}