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:用dp怎么做的?

Posted by hutu_2000 at 2009-04-03 11:58:47 on Problem 1953
In Reply To:Re:用dp怎么做的? Posted by:hutu_2000 at 2009-04-03 11:49:43
s[i]=2*s[i-1]-b; b=a; a=s[i]-b;    a表示s[i-1]中以0开头的数字,b表示s[i-1]中以1开头的数字,(因为s[i]一定可以分裂成0/1和s[i-1]两个部分;)

和上面的那个代码思想差不多,只是我的更省空间

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