| ||||||||||
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:二分怎么写? 给的数字又不是排好序的?In Reply To:二分怎么写? 给的数字又不是排好序的? Posted by:542935296 at 2011-07-31 10:17:24 二分法需要求出给定数列的前缀和,这样前缀和就是升序的,每次考察第i个前缀和,寻找s[i]+S出现的位置(二分搜索),这样总的复杂度是 nlog(n) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator