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

Re:奇怪,随手套了个树状数组模板就第一了(282ms),大家怎么做的?

Posted by morris1028 at 2013-04-30 11:09:06 on Problem 2489
In Reply To:奇怪,随手套了个树状数组模板就第一了(282ms),大家怎么做的? Posted by:checkoj at 2012-07-15 15:24:30
算出每個線段的方程 ax+by = c
將同一方程分堆,在同一堆中使用掃描線算法,
即等價於計算一維空間的區間的 overlap pair. O(nlogn)
// 860 ms

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