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:尝试着用贪心没想到就AC了。。。

Posted by qinlu at 2004-07-23 14:45:10 on Problem 1615
In Reply To:Re:尝试着用贪心没想到就AC了。。。 Posted by:richardhuang at 2004-07-23 14:31:04
先把每列数据正负相间按照原顺序排好,然后每列中相邻的正负数据作为一组,每次选取m列中某列的第一组直到全部选完。选取的规则如下:如果先加入a再加入b后的最大高度小于先加入b再加入a后的最大高度那么a优于b,每次选取m列中最优的即可。

> 怎么用贪心?

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