Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
16个数中去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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator