Kolakoski
Score: 62.16 (pass)
this improves my tiebreak slightly (hoo-ray, clap hands, run around squealing with glee)
#!perl
s/.?/$ARGV[$"++%2]x($&||1)/eg until$"=/.{$ARGV[2]}/;print$&.$/
|
Score: 62.19 (pass)
Finally! One whole character off kola. Beginning to think this is wrong method.
#!perl
s/.?/$ARGV[$i++%2]x($&||1)/eg until$i=/.{$ARGV[2]}/;print$&.$/
|
Score: 63.23 (pass)
#!perl -l
$i=1,s/.?/$ARGV[$i^=1]x($&||1)/eg until/.{$ARGV[2]}/;print$&
|
Score: 72.21 (pass)
took me far too long to get this bugger to work
#!perl -l
while(!s/(.{$ARGV[2]}).*/$1/){$i=1;s/.?/$ARGV[$i^=1]x($&||1)/eg}print
|
Score: 81.25 (pass)
as before, with array
(but not unorthodox, just embarrassingly long)
#!perl -l
eval'$l=@a;map$l-=$_*!!$l,@a;push@a,$d=$ARGV[!!$l^$d==$ARGV[0]];'x
pop;print@a
|
Score: 82.23 (pass)
I've given up on getting anything less than 62, I think, so I'm reduced to playing with this..
#!perl -l
eval'$l=$s++;map$l-=$_*!!$l,/./g;s/$/$d=$ARGV[!!$l^$d==$ARGV[0]]/e;'x
pop;print
|
Score: 83.23 (pass)
I don't think I can get this much shorter. Now that it's gone this far, though, I wouldn't be too surprised to find someone else with the same solution.
#!perl -l
eval'$l=@a=/./g;map$l-=$_*!!$l,@a;s/$/$ARGV[!!$l^$a[-1]==$ARGV[0]]/;'x
pop;print
|
Score: 100.22 (pass)
I refuse to let the work I did on this go unnoticed, even if it is 38 characters longer than my best solution
#!perl -l
eval'if($l=@a=/./g){$i++until($l-=$a[$i])<1}
$i=!s/$/$ARGV[($a[-1]==$ARGV[0])^!!$l]/;'x
pop;print
|