Documente Academic
Documente Profesional
Documente Cultură
h>
using namespace std;
#define M 26
int odd = 0;
if (!isPalin(str, freq))
return;
int l = str.length();
string palin;
do
{
palin = half;
if (l % 2 == 1)
palin += oddC;
palin += reverse(half);
cout << palin << endl;
}
while (next_permutation(half.begin(), half.end()));
}
int main()
{ string str;
cin>>(str);
//cout << "All palindrome permutations of " << str << endl;
printAllPossiblePalindromes(str);
return 0;
}