Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:奇怪,随手套了个树状数组模板就第一了(282ms),大家怎么做的?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator