Derangements by tails

G
:
s/.\w*/&1&2&3&4&5&6/g
s/\n\(1\|.2\|..3\|...\(4\|.5\|..6\)\|.*\(.\).*\3\)//mg
/6\b/b
s/.//

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page