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 |
原来也可以用组合的方法,不过就是要有点小小的改动void make(int k) { int i; if(k==n) { for(i=0;i<n-1;i++) printf("%c",ss[i]); printf("%c\n",ss[i]); return; } i=0; while(i<n) { if (bo[i]) { bo[i]=0; ss[k]=s[i]; make(k+1); bo[i]=1; while(s[i]==s[i+1])i++; } i++; }; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator