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 zhaojianbo at 2009-03-30 18:13:50 on Problem 1980
剪枝没第一个那么复杂,因为要保持有序(升序)这样就会把1/3+1/2和1/2+1/3看成同一个方案。所以:
搜索范围的最小值:上一个选定的分母
搜索范围的最大值:a/前几个单分数分母的乘积
建议不要用第二个帖子里的double做,浮点运算有精度问题……

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