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 |
平衡树,297ms水过……快排 + 扫描。 扫描时用平衡树维护当前尚存的线段的高度,遇右端点删除对应左端点, 每次ans += tree[root].max * (point[i].position - ps[i-1].postion)。 输出我用的cout。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator