Fox Labeling

무작위로 라벨을 찍는 과정을 반복해 n마리의 여우가 모두 서로 구별될 때까지 걸리는 기대 시간을 분 단위로 구한다.

어려움9확률동적 계획법조합론아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

Bytica works in the biological expedition. Now she got nn colored foxes for experiments. There's a problem,  however: foxes of the same color are absolutely indistinguishable.

Now Bytica wants to mark the foxes with colored labels. She repeats the following steps until each pair of foxes becomes distinguishable:

  • select some color that has not yet been used (not even as the natural color of some fox),
  • get kk random foxes from the cage (each subset of size kk is equally likely to be chosen),
  • mark each of them with a label of the selected color.

Each procedure (three steps) takes exactly one minute.

Two foxes are considered to be distinguishable if their colors differ or sets of colors of their labels differ.

The only thing Bytica is unsure about now is the expected time before all foxes will be pairwise distinguishable. So she asked you to write a program to compute this value.

입력

Input consists of two lines. The first line contains two integers nn and kk (1k<n301 \le k < n \le 30). The second line contains nn integers, the ii-th integer describes the initial color of the ii-th fox.

Colors are denoted by positive integers not exceeding 10001000.

출력

Print one real number: the expected time in minutes before each pair of foxes becomes distinguishable. Your answer will be considered correct if its relative or absolute error is within 10610^{-6}.