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

Re:暴搜

Posted by lulyon at 2011-03-14 14:01:45 on Problem 3278
In Reply To:暴搜 Posted by:lulyon at 2011-03-14 12:35:47
还可以剪枝:
1.k<=n是不用搜索,直接n-k.
2.当k为奇数时,搜索范围限于[0, k+1];当k为偶数时,搜索范围限于[0, k].
3.搜到k为止.

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