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

送上0MS简单代码

Posted by LXY5201314 at 2018-01-18 00:59:10 on Problem 1146
#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
    char s[60];
    while(1)
    {
        cin>>s;
        if(strcmp(s,"#")==0)break;
        if(next_permutation(s,s+strlen(s)))cout<<s<<endl;
        else cout<<"No Successor"<<endl;
    }
    return 0;
}

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