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

平衡树,297ms水过……

Posted by Ever_ljq at 2011-06-13 22:19:23 on Problem 3277
快排 + 扫描。

扫描时用平衡树维护当前尚存的线段的高度,遇右端点删除对应左端点,
每次ans += tree[root].max * (point[i].position - ps[i-1].postion)。

输出我用的cout。

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