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

终于过了,无语了,Wa的注意下

Posted by bobchennan at 2009-11-19 14:36:16 on Problem 1322
很可能是没有判断!=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:
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