https://www.cnblogs.com/My-Sunshine/p/4985366.html
模板
//需要sort一遍 do { for (int i=1;i<n;i++) { printf("%5d",a[i]); } printf("%5d ",a[n]); }while(next_permutation(a+1,a+n+1));
https://www.cnblogs.com/My-Sunshine/p/4985366.html
模板
//需要sort一遍 do { for (int i=1;i<n;i++) { printf("%5d",a[i]); } printf("%5d ",a[n]); }while(next_permutation(a+1,a+n+1));