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

next_permutation 过了

Posted by speedcell4 at 2011-03-29 14:24:26 on Problem 1731 and last updated at 2011-03-29 14:24:38
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    char a[210];
    gets(a);
    int l=strlen(a);
    sort(a,a+l);
    do
    {
        puts(a);
    }
    while(next_permutation(a,a+l));
}

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