#!perl -l $.=pop;push@*,($==$ARGV[$%%2])x($*[$%++]||$=)while$%<$.;print@*[0..$.-1] |
#!perl -l $.=pop;push@*,($==$ARGV[$%%2])x($*[$%++]||$=)while$%<$.;print@*[0..$.-1] |
The new tiebreaker rules make for some seriously ugly variable name choices. ;-)
#!perl -l
$.=pop;@*=@%=@ARGV;@*=map{($%[$==!$=])x$_}@*,$==1while$.>=@*;print@*[0..$.-1]
|
Ugly. I think I have a better way, but I wanted to just get on the board. :-)
#!perl -l $e=pop;$i=$ARGV[$==!$=],push(@o,($i)x($o[$o++]||$i))while@o<$e;print@o[0..$e-1] |