心如止水
Je n'ai pas le temps
posts - 400,comments - 130,trackbacks - 0
以下是我的代码:
#include<iostream>
#include
<string>
#include
<algorithm>
using namespace std;

int main()
{
    
string s;
    
while(cin>>&& s!="#")
    {
        
if(next_permutation(s.begin(),s.end()))
            cout
<<s<<endl;
        
else
            cout
<<"No Successor"<<endl;
    }

    
return 0;
}
posted on 2011-04-15 16:14 lee1r 阅读(283) 评论(0)  编辑 收藏 引用 所属分类: 题目分类:基础/模拟题目分类:递推/递归

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理