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 gzw_02 at 2008-05-23 23:05:23 on Problem 1014
In Reply To:回朔加强剪枝过了 Posted by:ssadwlll at 2008-05-04 13:46:22
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:其实这个也是剪枝的一种,呵呵.

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