| ||||||||||
| 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 | |||||||||
送上0MS简单代码#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator