{"problem":{"name":"Split and Maximize","description":{"content":"The score of a permutation $P=(P_1,P_2,\\ldots,P_{2N})$ of $(1,2,\\ldots,2N)$ is defined as follows: > Consider dividing $P$ into two (not necessarily contiguous) subsequences $A = (A_1,A_2,\\ldots,A_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":"arc145_c"},"statements":[{"statement_type":"Markdown","content":"The score of a permutation $P=(P_1,P_2,\\ldots,P_{2N})$ of $(1,2,\\ldots,2N)$ is defined as follows:\n\n> Consider dividing $P$ into two (not necessarily contiguous) subsequences $A = (A_1,A_2,\\ldots,A_N)$ and $B = (B_1,B_2,\\ldots,B_N)$. The score of $P$ is the maximum possible value of $\\displaystyle\\sum_{i=1}^{N}A_i B_i$ in such a division.\n\nLet $M$ be the maximum among the scores of all permutations of $(1,2,\\ldots,2N)$. Find the number, modulo $998244353$, of permutations of $(1,2,\\ldots,2N)$ with the score of $M$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2\\times 10^5$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc145_c","tags":[],"sample_group":[["2","16\n\nThe maximum among the scores of the $24$ possible permutations, $M$, is $14$, and there are $16$ permutations with the score of $14$.\nFor instance, the permutation $(1,2,3,4)$ achieves $\\sum _{i=1}^{N}A_i B_i = 14$ in the division $A=(1,3), B=(2,4)$."],["10000","391163238\n\nPrint the count modulo $998244353$."]],"created_at":"2026-03-03 11:01:14"}}