initial attempt. sans efficiency.

i've verified that, eventually, it returns the right answers using the
system test feature, but that it will fail after some time for problems
of large space (>10).

i caved in, afterwards, because besides not making array copies, i
didn't say a better way to prune the search tree, and couldn't
understand how else anyone solved it, and looked at someone else's
answer.

they noticed that, if you generate the child array from the original
permutation, as soon as a duplicate was encountered in the child array,
they could pick a non-duplicate in its place, and start the algorithm
again. they'd sum these "start overs" to yield the answer. the thing i'm
struggling to see is why that's legal, and how they know their next
decision is optimal. i plan to investigate this further, even though
it'll delay work on future problems.