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 |
贪心+线段树返回的过程可以视为再顺着走一遍,把S和E倒一下就行。 首先按照E排序,从E小到大扫描,能坐得下就尽量往里坐,用线段树记录每一段的乘客量,维护一下就行。。用数组或者堆感觉反而不好写。。线段树写还是挺快的。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator