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

线段树的应用

Posted by yc5_yc at 2012-07-17 16:20:59 on Problem 2761
    对于每一个线段,我们使用一个权值来存储在其内“存在”的狗的个数,这样线段树就成了一个类似HASH表的东西,保存了每个狗是否存在,这样,根据其性质,我们在O(logn)的时间内就可以找到一个狗是第几个(前面已经排序+离散化了),二分即可。
同时,我还明白了“离线”是什么东西。

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