5 4

1 2

1 3

1 4

1 5

0.800000

# 题解

$ans&space;=&space;\frac{n-1}{n}&space;*&space;[&space;\frac{s_{1}-1}{n-1}&space;+&space;(\frac{n-s_{1}}{n-1}&space;*&space;\frac{n-s_{1}-1}{n-s_{1}}&space;*&space;\frac{s_{2}-1}{n-s_{1}-1})&space;*&space;...&space;]$