阅读801 返回首页    go 京东网上商城


next_permutation的使用

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
    string s("12435");

    sort(s.begin(), s.end());
    cout << s << endl;
    
    //next_permutation的使用
    while (next_permutation(s.begin(), s.end()))
        cout << s << endl;

    cin.get();
    return 0;
}

最后更新:2017-04-02 15:15:29

  上一篇:go maven学习七之用户密码修改和添加用户
  下一篇:go 揭秘APP刷榜黑幕 暴利催生的产业链