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 _mTy at 2011-02-11 15:52:03 on Problem 1882
In Reply To:Re:是这个测试数据有问题,,,,没有按升序排列,,,,, Posted by:yy17yy at 2011-01-16 08:59:21
> 答案510我估计是因为他对程序做了小优化,,,背包重量V的循环那层不是1...V而是1...data[i]*S,,,,因为显然如果是升序排列的话,,data[i]*S到V之间是不可能装上的,,,但如果不是升序的话,,,就不能直接这么写了,,,导致了答案的分歧,,,,,
> 
> 其实,,我也得510,,,

嗯。541才对,我的程序应该没问题的~

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