Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

线段树就非得插入线段么? ==〉 Good!真好人。=_+

Posted by patina at 2005-07-18 19:46:20 on Problem 2489
In Reply To:按左端点排序, 插入右端点 Posted by:c0500448242 at 2005-07-18 19:42:29
> 比如:
> 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator