zoukankan      html  css  js  c++  java
  • POJ 1731

    //注意只有一组数据,否则OLE 
    //题意:输出字符串的全排列 
    #include <iostream>
    #include <string>
    #include <algorithm>
    #include <cstdlib>
    #include <queue>//less算子 
    using namespace std;
    int main()
    {
        int i,j,k;
        char s[210];
        //while(1)
        {
            memset(s,0,sizeof(s));
            cin>>s;
           // if(s=="NULL")
               // break;
            int len = strlen(s);
            sort(s,s+len,less_equal<char >() );
            do
            {
                for(i=0;i<len;i++)
                    cout<<s[i];
                cout<<endl;
            }while(next_permutation(s,s+len));
        }
        //system("pause");
        return 0;
    }
            
            
    
  • 相关阅读:
    bzoj1711
    bzoj1458
    bzoj1433
    hdu2732
    bzoj1066
    hdu3549
    poj1698
    [ZJOI2007]时态同步
    SA 学习笔记
    [LUOGU]2016 Sam数
  • 原文地址:https://www.cnblogs.com/hxsyl/p/2638850.html
Copyright © 2011-2022 走看看