很好用的全排列模板
#include<algorithm>
#include<cstdio>
using namespace std;
int ss[
11] = {
1,
2,
3,
4,
5,
6,
7,
8,
9,
10};
int main()
{
int n;
scanf(
"%d",&n);
do{
for(
int i=
0;i<n;i++)
printf(
"%d",ss[i]);
printf(
"\n");
}
while(next_permutation(ss,ss+n))
}
转载请注明原文地址: https://ju.6miu.com/read-200195.html