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

O(n*logn)可解 枚举height+二分上下界

Posted by Jireh at 2013-10-10 09:36:16 on Problem 3415
O(n*logn)可解 从大到小枚举height,然后二分上下界,分别统计该组内属于A,B的个数(a,b)(可预处理),然后拿a*b*w (w=该组height-该组上下界height最大值)。如果该height已被之前统计过,跳过即可
欢迎大家探讨~


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