{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eNoticeļ¼Don\u0027t output extra spaces at the end of one line.\u003cbr\u003e\u003cbr\u003eThere are $(2n+1)$ distinct positions on the number line, $x_1,x_2,....x_{2n+1}$ in the strictly increasing order. each position with odd index is a hole and each postition with even index is a ball.\u003cbr\u003e\u003cbr\u003eKoishi will play a game consisting of $n$ rounds, in each round:\u003cbr\u003e\u003cbr\u003e1.Koishi selects a ball that isn\u0027t in holes at random.\u003cbr\u003e\u003cbr\u003e2.then select the direction,left or right at random.\u003cbr\u003e\u003cbr\u003e3.then the chosen ball starts rolling in that chosen direction, until it falls into an empty hole(the hole with no ball falling into it before)\u003cbr\u003e\u003cbr\u003eKoishi is interested in the sum of distances of balls rolling. What is the expected value of the sum? modulo $998244353$ \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"First line contains an integer $T(1\\leq T\\leq 2000)$, number of test cases.\u003cbr\u003e\u003cbr\u003eIn each test cases, the first line contains an integer $n(1\\leq n\\leq 3000)$. The second line contains $(2n+1)$ integers in a single line representing $x_1,x_2,...x_{2n+1}$\u003cbr\u003e\u003cbr\u003e$-10^9\\leq x_1\u0026lt;x_2,...,\u0026lt;x_{2n+1}\\leq 10^9$"}},{"title":"Output","value":{"format":"HTML","content":"$T$ lines, each with a non-negative integer representing the answer."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n1\r\n1 2 3\r\n3\r\n1 2 3 4 5 6 7\r\n10\r\n0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n332748122\r\n969129126\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}