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 lu_newcomer at 2013-03-22 21:35:05 on Problem 1014
In Reply To:Re:回朔加强剪枝过了 Posted by:gzw_02 at 2008-05-23 23:05:23
> Hi 我也是搜索加剪枝.
> 但是有一组数据过不了.
> 0 6001 0 6999 0 7000
> 要加一个判断
> if(half%2==1&&a[5]==0&&a[3]==0&&a[1]==0)
> 		   {//不加这个判断,搜索算法TL
> 			   cout<<"Collection #"<<no<<":"<<endl<<"Can't be divided."<<endl<<endl;
> 			   no++;
> 			   continue;
> 		   }
> 
> PS:其实这个也是剪枝的一种,呵呵.
这个应该是对2,4,6的剪枝吧。
还有一个针对3,6的类似剪枝。我两个都加了,0毫秒。但是不太确定为什么这就0毫秒。。。

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