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 |
终于过了,无语了,Wa的注意下很可能是没有判断!=EOF 我一开始没判断,就一直Wa for (i=1;i<=n;i++) for (j=0;j<=c;j++) if (!j) dp[i][j]+=dp[i-1][j+1]/c; else if (j==c) dp[i][j]+=dp[i-1][j-1]/c; else dp[i][j]+=(dp[i-1][j-1]*(c-j+1)+dp[i-1][j+1]*(j+1))/c; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator