Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:尝试着用贪心没想到就AC了。。。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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator