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

原来也可以用组合的方法,不过就是要有点小小的改动

Posted by wolfchuyan at 2007-05-27 06:24:16 on Problem 1256
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:
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