{"raw_statement":[{"iden":"problem statement","content":"Given is an integer sequence of length $N+1$: $X_0,X_1,\\ldots,X_N$, where $0=X_0 < X_1 < \\ldots < X_N$ holds.\nNow, $N$ people numbered $1$ through $N$ will appear on a number line. Person $i$ will appear at a **real** coordinate chosen uniformly at random from the interval $[X_{i-1},X_i]$.\nFind the expected value of the smallest distance between two people, modulo $998244353$.\nDefinition of the expected value modulo $998244353$We can prove that the expected value in question is always a rational number. We can also prove that, under the constraints of this problem, if we express the expected value as an irreducible fraction $\\frac{P}{Q}$, we have $Q \\neq 0 \\pmod{998244353}$. Thus, there uniquely exists an integer $R$ such that $R \\times Q \\equiv P \\pmod{998244353}, 0 \\leq R < 998244353$. Report this $R$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 20$\n*   $0=X_0 < X_1 < \\cdots < X_N \\leq 10^6$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$X_0$ $X_1$ $\\ldots$ $X_N$"},{"iden":"sample input 1","content":"2\n0 1 3"},{"iden":"sample output 1","content":"499122178\n\nThere are just two people, so the expected value of the smallest distance between two people is just the expected value of the distance between Person $1$ and Person $2$. The answer is $3/2$."},{"iden":"sample input 2","content":"5\n0 3 4 8 9 14"},{"iden":"sample output 2","content":"324469854\n\nThe answer is $196249/172800$."},{"iden":"sample input 3","content":"20\n0 38927 83112 125409 165053 204085 246405 285073 325658 364254 406395 446145 485206 525532 563762 605769 644863 683453 722061 760345 798556"},{"iden":"sample output 3","content":"29493181"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}