根据其他题解(csyfZhang中)所改,将str[s:t]的全排列转化为以s[i]开头 s[s+1:t]的全排列 ">#include<algorithm> #include<string> using namespace std; void pailie(string &str, int s, int t) { if (s == t){ cout << str << endl; return; } for (int i = s; i <= t; i++) { swap(str[s...