UVa 10098

From Algorithmist
Jump to navigation Jump to search

10098 - Generating Fast, Sorted Permutation[edit]

Summary[edit]

Generate all unique permutations in sorted order.

Explanation[edit]

Use the C++ stl permutation and you should be able to pass the tests.

Input[edit]

3
ab
abc
bca

Output[edit]

ab
ba

abc
acb
bac
bca
cab
cba

abc
acb
bac
bca
cab
cba

Solutions[edit]