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 |
拆分成立条件设n可拆分成j个连续数的和,求出s=(1+j)*j/2;则有s%j==n%j成立,j最大可取到sqrt(2*n);复杂度为O(aqrt(2*n)). Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator