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:如何暴力计算??样例一直过不了....In Reply To:如何暴力计算??样例一直过不了.... Posted by:wzc1989 at 2009-02-22 21:34:54 就是这样,但是有一点,那7^4个状态不是等概率的!对每个骰子来说,有一个面是红色的概率是 C(1,6)*(0.5)^6,只考虑相对的,用C(1,6)就可以了,否则太小了可能有精度问题。 这样,对于(a[1],a[2],a[3],a[4])这个骰子的状态,应该再加的权是 C(a[1],6)*C(a[2],6)*C(a[3],6)*C(a[4],6),最后归一化就可以了 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator