{"raw_statement":[{"iden":"problem statement","content":"There is a board game with $N+1$ squares numbered $0, 1, \\dots, N$.  \nYou also have an $M$\\-sided die, where each side shows a distinct positive integer $A_1, A_2, \\dots, A_M$ with equal probability.  \nAdditionally, there are traps on squares $B_1, B_2, \\dots, B_L$. Here, $1 \\leq B_i \\leq N-1$, and all $B_i$ are distinct.\nYou will play the following game:\n\n*   Place your piece on square $0$ at the beginning. While the game continues, repeat:\n    *   Roll the die. If your piece is on square $x$ and the die shows $y$, move the piece to square $\\min(N, x+y)$.\n*   If the piece lands on a trap square, you lose immediately.\n*   If the piece reaches square $N$ without landing on a trap, you win immediately.\n\nCompute the probability that you win the game, modulo $998244353$.\nWhat does probability modulo $998244353$ mean? It can be proven that the probability is always a rational number. Under the constraints of this problem, if the probability is written as $\\tfrac{P}{Q}$ with coprime integers $P$ and $Q$, then there exists a unique integer $R$ such that $R \\times Q \\equiv P \\pmod{998244353}$ and $0 \\leq R < 998244353$. You are asked to compute this $R$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 2.5 \\times 10^5$\n*   $1 \\leq M \\leq N$\n*   $1 \\leq L \\leq N-1$\n*   $1 \\leq A_1 < A_2 < \\dots < A_M \\leq N$\n*   $1 \\leq B_1 < B_2 < \\dots < B_L \\leq N-1$\n*   All input values are integers"},{"iden":"input","content":"The input is given from standard input in the following format:\n\n$N$ $M$ $L$\n$A_1$ $A_2$ $\\dots$ $A_M$\n$B_1$ $B_2$ $\\dots$ $B_L$"},{"iden":"sample input 1","content":"2 2 1\n1 2\n1"},{"iden":"sample output 1","content":"499122177\n\nYou can only win if the die shows $2$. Thus, the probability is $\\tfrac{1}{2}$."},{"iden":"sample input 2","content":"250000 10 8\n1 2 3 4 5 6 7 8 9 100000\n21994 47718 98917 104184 160670 204838 205220 207793"},{"iden":"sample output 2","content":"718440495"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}