ACM PKU 1731 Orders STL最基本应用

#include <iostream>
#include 
<string>
#include 
<algorithm>
 
using namespace std;

int main()
{
    
string str;
    
while(cin>>str)
    
{
        sort(
&str[0],&str[0]+str.length());//先排序
        cout<<str<<endl;//输出排序后的
        while(next_permutation(&str[0],&str[0]+str.length()))
        
{
            cout
<<str<<endl;
        }

    }

    
return 0;
}

posted on 2007-09-20 21:58 流牛ζ木马 阅读(851) 评论(0)  编辑 收藏 引用

<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

导航

统计

公告

MY Email/MSN :mars1021@163.com QQ : 27402040 流牛ζ木马

常用链接

留言簿(6)

随笔档案

相册

搜索

最新随笔

最新评论

阅读排行榜

评论排行榜