1622 - Creating Strings I
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
int main(void)
{
string s;
vector<string> ans;
cin >> s;
sort(s.begin(), s.end());
do
{
ans.push_back(s);
} while (next_permutation(s.begin(), s.end()));
cout << ans.size() << endl;
for (auto a : ans)
cout << a << endl;
return 0;
}