{"raw_statement":[{"iden":"problem statement","content":"You are given an integer $N$ and a set $S=\\lbrace S_1,S_2,\\ldots,S_K\\rbrace$ consisting of integers between $1$ and $N-1$.\nFind the number, modulo $998244353$, of trees $T$ with $N$ vertices numbered $1$ through $N$ such that:\n\n*   $d_i\\in S$ for all $i\\ (1\\leq i \\leq N)$, where $d_i$ is the degree of vertex $i$ in $T$."},{"iden":"constraints","content":"*   $2\\leq N \\leq 2\\times 10^5$\n*   $1\\leq K \\leq N-1$\n*   $1\\leq S_1 < S_2 < \\ldots < S_K \\leq N-1$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $K$\n$S_1$ $\\ldots$ $S_K$"},{"iden":"sample input 1","content":"4 2\n1 3"},{"iden":"sample output 1","content":"4\n\nA tree satisfies the condition if the degree of one vertex is $3$ and the others' are $1$. Thus, the answer is $4$."},{"iden":"sample input 2","content":"10 5\n1 2 3 5 6"},{"iden":"sample output 2","content":"68521950"},{"iden":"sample input 3","content":"100 5\n1 2 3 14 15"},{"iden":"sample output 3","content":"888770956\n\nPrint the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}