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:一直是WA,谁能给一级测试数据

Posted by lironghua at 2008-09-04 11:53:27 on Problem 1874
In Reply To:一直是WA,谁能给一级测试数据 Posted by:wanghaishanren at 2008-04-29 13:17:12
试试以下2租数据
1
2 11 16
2
2 11 16
2 1 3
输出应该是
Workyards 1
Maximum profit is 0.
Number of pruls to buy: 0

Workyards 2
Maximum profit is 16.
Number of pruls to buy: 2
要注意最大利润小于0时的情况,最大利润小于0时,商人是不会买该堆的物品,即此时该堆最大的利润应该是0,而不是所求得的那个负数。

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