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:这题如何用贪心做啊?In Reply To:这题如何用贪心做啊? Posted by:1292765944 at 2012-11-29 21:33:21 把输入的区间按照右端点从小到大排序,每次查询当前区间内的点是否已经足够, 若不够则从区间右边开始取点,直至恰好满足该区间所要求的点数。 实现的时候用线段树吧…… 不过这题还是用差分约束系统做顺一些。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator