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

就像这个,标程的核心部分

Posted by sunmoonstar_love at 2005-08-05 22:21:40 on Problem 2537
In Reply To:最经典的在DP中解决精度问题, double ok Posted by:sunmoonstar_love at 2005-08-05 22:20:44
      for (i=1;i<n;i++) {
         for (j=0;j<k;j++) 
             x[i][j] += x[i-1][j]/k;
         for (j=1;j<k;j++) 
             x[i][j] += x[i-1][j-1]/k;
         for (j=0;j<k-1;j++) 
             x[i][j] += x[i-1][j+1]/k;
       }

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