PAST4E
PAST4E
Thoughts.
5 so all search
code:python
def solve(N, S):
from itertools import permutations
rS = "".join(reversed(S))
for p in permutations(S):
ret = "".join(p)
if ret != S and ret != rS:
return ret
return "None"
---
This page is auto-translated from /nishio/PAST4E. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.