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 |
sort by v asc and w desc then nlogn segment tree O(nlogn)group by v after sort get K groups build a segment tree of size K then 1. find the best node from segment tree as Node 2. update the best node to be the node whose v equals Node.v but w less than Node.w repeat 1 2 ntimes nlogk + nlogn sort Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator