next_permutation
来源:互联网 发布:网络科学导论 课程 编辑:程序博客网 时间:2024/05/20 05:28
1 2 3的全排列
#include <iostream>
#include <algorithm>#include<cstdio>
using namespace std;
int main()
{
int b[4]={0,1,2,3};
for(int i=1;i<=6;i++)
{
for(int j=1;j<=3;j++)
cout<<b[j]<<" ";
cout<<endl;
next_permutation(b+1,b+1+3);
}
cout<<endl;
for(int i=1;i<=6;i++)
{
for(int j=0;j<3;j++)
cout<<c[j]<<" ";
cout<<endl;
next_permutation(c,c+3);
}
return 0;
}
0 0
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- 在Android中应用MVP模式
- leetcode#94
- 【git】-git的特点
- 分辨服务器是linux系统还是Windows系统
- Java中分布式案例的实现方法
- next_permutation
- jeesite快速开发平台(二)---环境搭建
- C++面试题模拟实现String
- 从开机到加载操作系统计算机究竟干了啥?
- 『 Hello World 』By Blog
- TP 框架 常识
- spring与struts2整合案例
- Java调用本地接口:java.lang.UnsatisfiedLinkError
- Python 环境搭建(Mac OS)