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

用DP的同学,我觉得第一组数据初始化时还需做最小处理,不能简单的dp[0][b[k]] = p[k]

Posted by Maxwell_pp at 2015-05-10 17:33:09 on Problem 1018
用DP的同学,我觉得第一组数据初始化时还需做最小处理,不能简单的dp[0][b[k]] = p[k],
因为有可能有重复数据出现,如 100 50 100 60,
或者考虑如下的数据:
1
2
2 120 50 120 60
2 120 60 150 50
========
答案大概有两种,1.200或者1.091, 我个人更倾向于1.200。大家可以考虑一下。

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