include <iostream>
#include <string> using namespace std; void swap(char &c1, char &c2){
char tmp = c1;
c1= c2;
c2= tmp;
} void perm(string s, int i, int n){ if(i== n){
cout << s << endl;
} for(int j=i;j<=n;j++){
swap(s[i], s[j]);
perm(s, i+, n);
swap(s[i], s[j]);
} } int main(){ string p= "";
perm(p, , ); }
相关文章
- 11-26003递归实现排列型枚举
- 11-26打印图形—等腰三角形、菱形、AB排列图形
- 11-26GYM 101933K(二项式反演、排列组合)
- 11-26【AtCoder】AGC005 F - Many Easy Problems 排列组合+NTT
- 11-26awk小例子_1_逆序排列
- 11-26EularProject 43: 带条件约束的排列组合挑选问题
- 11-26code forces 436 D. Make a Permutation!
- 11-26LeetCode 46 全排列
- 11-26LG题解 P7843 「PMOI-4」猜排列
- 11-26Wunder Fund Round 2016 (Div. 1 + Div. 2 combined) B. Guess the Permutation