AT_abc189_f Sugoroku2
Description
Takahashi is playing sugoroku.
The board has $N+1$ squares numbered $0$ to $N$. Takahashi starts at Square $0$ and head to Square
$N$.
In this sugoroku, we use a wheel showing numbers from $1$ through $M$ with equal probability. In each turn, Takahashi spins the wheel and advances by the number shown by the wheel. When it makes him reach Square $N$ or go past it, he wins.
Some of the squares send him to Square $0$ when he stops on them. There are $K$ such squares: Square $A_1,\cdots,A_K$.
Find the expected value of the number of times Takahashi spins the wheel before he wins. If it is impossible to win, print `-1` instead.
Input Format
Input is given from Standard Input in the following format:
> $N$ $M$ $K$
> $A_1$ $\cdots$ $A_K$
Output Format
Print the expected value of the number of times Takahashi spins the wheel before he wins. Your output is considered as correct when its absolute or relative error from our answer is at most $10^{-3}$. If it is impossible to win, print `-1` instead.
Explanation/Hint
### Constraints
- All values in input are integers.
- $1 \le N \le 10^5$
- $1 \le M \le 10^5$
- $0\le K \le 10$
- $0 < A_1 < \cdots < A_K < N$