Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re: ans2怎么推。。

Posted by wyh4104314 at 2008-08-31 18:02:00 on Problem 3682
In Reply To:Re:大牛们都怎么做的啊?提示一下吧~~~迭代算出概率过了但是好慢啊 Posted by:TheBeet at 2008-08-31 17:47:01
> ans1 = k / p;
> ans2 = (k + 1) * ans1 / p - ans1;

ans2,
怎么来的,上面那个式子,
我是这样,
推ans2=k^2*p^k + (k+1)^2*C(k+1,1)*(1-p)*p^k +...
        + (k+i)^2*C(k+i-1,i)*(1-p)^i*p^k+...
然后迭代算ans2,tle!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator