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:是这个测试数据有问题,,,,没有按升序排列,,,,,

Posted by yy17yy at 2011-01-16 08:59:21 on Problem 1882
In Reply To:对一组数据 请问AC的程序算得多少 谢谢! Posted by:whj1991 at 2010-09-13 12:03:05
答案510我估计是因为他对程序做了小优化,,,背包重量V的循环那层不是1...V而是1...data[i]*S,,,,因为显然如果是升序排列的话,,data[i]*S到V之间是不可能装上的,,,但如果不是升序的话,,,就不能直接这么写了,,,导致了答案的分歧,,,,,

其实,,我也得510,,,

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