Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
嗯,解释下。。。In Reply To:Re:麻烦各位看下程序,WA了快20次了... Posted by:lcjh at 2009-08-23 19:29:44 > 你应该稍微解释下... 根据题目,有P[i]=P[i-2]*(1-p)+P[i-1]*p,然后可以推出公式P[i]=(p-1)^n/(p-2)-1/(p-2). 然后每次算出到一个mine前面一个的概率,再跳过这个mine到它的后一格,就是乘以1-p。这样到最后一个mine的后一格的概率就是所求的答案. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator