Bath Queue

题意翻译

### 题目描述 有 $n$ 个学生住在学校里。学校中有 $m$ 个洗漱间,其中第 $i$ 个洗漱间中有 $a_i$ 个水盆。 每天早上所有的学生同时醒来并去洗漱。每一个学生随机进入一个洗漱间。随后,每一个房间内的学生尽量平均地分配到每一个水盆前,使得最长的队伍尽可能短。 请你求出所有的洗漱间中最长队伍的期望长度。 ### 输入格式 第一行两个正整数 $n$ 和 $m$($1\le n,m\le 50$)。 第二行包括 $m$ 个正整数 $a_i$($1\le a_i\le 50$),表示第 $i$ 个洗漱间内的水盆数量。 ### 输出格式 仅一个实数,表示所有洗漱间中最长队伍的期望长度。绝对误差或相对误差不超过 $10^{-9}$。

题目描述

There are $ n $ students living in the campus. Every morning all students wake up at the same time and go to wash. There are $ m $ rooms with wash basins. The $ i $ -th of these rooms contains $ a_{i} $ wash basins. Every student independently select one the rooms with equal probability and goes to it. After all students selected their rooms, students in each room divide into queues by the number of wash basins so that the size of the largest queue is the least possible. Calculate the expected value of the size of the largest queue among all rooms.

输入输出格式

输入格式


The first line contains two positive integers $ n $ and $ m $ ( $ 1<=n,m<=50 $ ) — the amount of students and the amount of rooms. The second line contains $ m $ integers $ a_{1},a_{2},...\ ,a_{m} $ ( $ 1<=a_{i}<=50 $ ). $ a_{i} $ means the amount of wash basins in the $ i $ -th room.

输出格式


Output single number: the expected value of the size of the largest queue. Your answer must have an absolute or relative error less than $ 10^{-9} $ .

输入输出样例

输入样例 #1

1 1
2

输出样例 #1

1.00000000000000000000

输入样例 #2

2 2
1 1

输出样例 #2

1.50000000000000000000

输入样例 #3

2 3
1 1 1

输出样例 #3

1.33333333333333350000

输入样例 #4

7 5
1 1 2 3 1

输出样例 #4

2.50216960000000070000