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:16个数中取4个数的排列有什么好的算法吗? 最好的复杂度大概是多少?

Posted by stu_butter at 2007-01-28 20:07:41 on Problem 3139
In Reply To:16个数中去4个数的排列有什么好的算法吗? 最好的复杂度大概是多少? Posted by:stu_butter at 2007-01-28 20:07:11
> 

是取4个数


> 我的做法是
> 
> 	do
> 	{
> 		j=0;
> 		for(i=0;i<16;i++)
> 			if(sign[i])
> 				temp[j++]=i;		
> 		do
> 		{
> 			
> 		}while(next_permutation(temp,temp+4));//再求全排列		
> 	
> 	}while(next_permutation(sign,sign+16));//求组合
> 
> 但是超时ING....

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