{"problem":{"name":"Social Distance 2","description":{"content":"There are $N$ chairs arranged in a row, called Chair $1$, Chair $2$, $\\ldots$, Chair $N$.   A chair seats only one person. $M$ people will sit on $M$ of these chairs. Here, let us define the score as ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc225_h"},"statements":[{"statement_type":"Markdown","content":"There are $N$ chairs arranged in a row, called Chair $1$, Chair $2$, $\\ldots$, Chair $N$.  \nA chair seats only one person.\n$M$ people will sit on $M$ of these chairs. Here, let us define the score as follows:\n\n> $\\displaystyle \\prod_{i=1}^{M-1} (B_{i+1} - B_i)$, where $B=(B_1,B_2,\\ldots,B_M)$ is the sorted list of the indices of the chairs the people sit on.\n\nPerson $i$ $(1 \\leq i \\leq K)$ is already sitting on Chair $A_i$.  \nThere are ${} _ {N-K} \\mathrm{P} _ {M-K}$ ways for the other $M-K$ people to take seats. Find the sum of the scores for all of these ways.\nSince this sum may be enormous, compute it modulo $998244353$.\n\n## Constraints\n\n*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $2 \\leq M \\leq N$\n*   $0 \\leq K \\leq M$\n*   $1 \\leq A_1 \\lt A_2 \\lt \\ldots \\lt A_K \\leq N$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$ $K$\n$A_1$ $A_2$ $\\ldots$ $A_K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc225_h","tags":[],"sample_group":[["5 3 2\n1 3","7\n\nIf Person $3$ sits on Chair $2$, the score will be $(2-1) \\times (3-2)=1 \\times 1 = 1$.  \nIf Person $3$ sits on Chair $4$, the score will be $(3-1) \\times (4-3)=2 \\times 1 = 2$.  \nIf Person $3$ sits on Chair $5$, the score will be $(3-1) \\times (5-3)=2 \\times 2 = 4$.  \nThe answer is $1+2+4=7$."],["6 6 1\n4","120\n\nThe score for every way of sitting will be $1$.  \nThere are ${} _ {5} \\mathrm{P} _ {5} = 120$ ways of sitting, so the answer is $120$."],["99 10 3\n10 50 90","761621047"]],"created_at":"2026-03-03 11:01:13"}}