atcoder#ABC225H. [ABC225H] Social Distance 2

[ABC225H] Social Distance 2

Score : 600600 points

Problem Statement

There are NN chairs arranged in a row, called Chair 11, Chair 22, \ldots, Chair NN. A chair seats only one person.

MM people will sit on MM of these chairs. Here, let us define the score as follows:

i=1M1(Bi+1Bi)\displaystyle \prod_{i=1}^{M-1} (B_{i+1} - B_i), where B=(B1,B2,,BM)B=(B_1,B_2,\ldots,B_M) is the sorted list of the indices of the chairs the people sit on.

Person ii (1iK)(1 \leq i \leq K) is already sitting on Chair AiA_i. There are NKPMK{} _ {N-K} \mathrm{P} _ {M-K} ways for the other MKM-K people to take seats. Find the sum of the scores for all of these ways.

Since this sum may be enormous, compute it modulo 998244353998244353.

Constraints

  • 2N2×1052 \leq N \leq 2 \times 10^5
  • 2MN2 \leq M \leq N
  • 0KM0 \leq K \leq M
  • 1A1<A2<<AKN1 \leq A_1 \lt A_2 \lt \ldots \lt A_K \leq N
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN MM KK

A1A_1 A2A_2 \ldots AKA_K

Output

Print the answer.

5 3 2
1 3
7

If Person 33 sits on Chair 22, the score will be (21)×(32)=1×1=1(2-1) \times (3-2)=1 \times 1 = 1. If Person 33 sits on Chair 44, the score will be (31)×(43)=2×1=2(3-1) \times (4-3)=2 \times 1 = 2. If Person 33 sits on Chair 55, the score will be (31)×(53)=2×2=4(3-1) \times (5-3)=2 \times 2 = 4. The answer is 1+2+4=71+2+4=7.

6 6 1
4
120

The score for every way of sitting will be 11. There are 5P5=120{} _ {5} \mathrm{P} _ {5} = 120 ways of sitting, so the answer is 120120.

99 10 3
10 50 90
761621047