diff options
Diffstat (limited to '146')
| -rw-r--r-- | 146/id.cpp | 15 | ||||
| -rw-r--r-- | 146/in | 24 |
2 files changed, 39 insertions, 0 deletions
diff --git a/146/id.cpp b/146/id.cpp new file mode 100644 index 0000000..58698fa --- /dev/null +++ b/146/id.cpp @@ -0,0 +1,15 @@ +#include <iostream> +#include <string.h> +#include <algorithm> + +int main(){ + char s[50]; + std::cin>>s; + while(s[0]!='#'){ + if(std::next_permutation(s, s+strlen(s))) + std::cout<<s<<std::endl; + else + std::cout<<"No Successor\n"; + std::cin>>s; + } +} @@ -0,0 +1,24 @@ +aaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaabcaaaaaaaaaaa +ghn +dqoggpbdrt +wlneeb +eeysvytn +bu +gar +izokc +dtbpihvjcz +ctldm +onuovwfrf +fri +u +olmviwa +oecbhqbvfx +aurubybsi +omecz +kxbuliympp +nu +z +gq +#
\ No newline at end of file |
