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 |
Re:矩阵乘法为什么WA,有大虾用矩阵过的吗,麻烦发下代码~~In Reply To:Re:矩阵乘法为什么WA,有大虾用矩阵过的吗,麻烦发下代码~~ Posted by:hello_kitty at 2009-08-23 18:45:05 > > > 我用矩阵乘法过了 [ 0 1-p ] [ 1 p ] 然后计算的时候 一个一个障碍的过去 比如 2 10 那么先计算到1 的概率, 然后等到到达1的概率p' 用p' * (1 - p) 就是到达 3是的概率 然后是计算从3 到达9 的概率 ,到达3是的概率是 p'' 那么到达9是的概率就是[p'', p* p''] * ([ 0 1-p ]) ^ 6 = (p''(9) , p''(10)) ([ 1 p ]) 然后用p''(9) * (1-p) 就是结果 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator