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

拆分成立条件

Posted by handle2 at 2009-08-05 19:36:21 on Problem 2853
设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:
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