summaryrefslogtreecommitdiff
path: root/146
diff options
context:
space:
mode:
Diffstat (limited to '146')
-rw-r--r--146/id.cpp15
-rw-r--r--146/in24
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;
+ }
+}
diff --git a/146/in b/146/in
new file mode 100644
index 0000000..b45e099
--- /dev/null
+++ b/146/in
@@ -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