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 |
按左端点排序, 插入右端点In Reply To:就是比如在x轴上,已经在线段树上插入了(1, 10), 再插入(2, 9),那么怎么实现计算重叠?我想的方法会有重复的 Posted by:patina at 2005-07-18 19:33:30 比如: 2 9 2 9 3 8 1 10 排序后: 1 10 2 9 2 9 3 8 过程如下: 1 10 Query(1) 0//查询大于1 的点的数目 Insert(10) 2 9 Query(2) 1 Insert(9) 2 9 Query(2) 2 Insert(9) 3 8 Query(3) 3 Insert(8) result 6 线段树就非得插入线段么? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator