��3位，为步数的期望值。若期望值为无穷大，则输出&quot;INF&quot;。</span></div>
<div align="left"><span style="font-size: medium">【样例输入1】</span></div>
<div style="text-indent: 21pt" align="left"><span style="font-size: medium">6 6 1 6</span></div>
<div style="text-indent: 21pt" align="left"><span style="font-size: medium">1 2</span></div>
<div style="text-indent: 21pt" align="left"><span style="font-size: medium">1 3</span></div>
<div style="text-indent: 21pt" align="le