Kolakoski Post Mortem Back to Perl Golf

Accepted | Artistic/Unorthodox | Rejected

Referee comments are in italics. Blue rows denote golfer's best solution. Red text denotes special characters.

Accepted

ScoreGolferSubmit TimeCode
52.12 BoB (Best of Breed - referees) Sat May 4 15:50:44 2002
-l print map$.[$!++]=$ARGV[1&($.+=!--$.[$.])],1..pop
Improve the tiebreak, before we forget abot it
52.13 BoB (Best of Breed - referees) Thu May 2 11:11:51 2002
-l print map$.[--$_]=$ARGV[1&($.+=!--$.[$.])],1..pop
Tadaaaaa!
54.11 BoB (Best of Breed - referees) Thu May 2 09:50:13 2002
-l print map$.[$!++]=$ARGV[--$.[$.]||++$.,$.%2],1..pop
Yay yay!
54.11 Jerome Quelin Sun May 5 07:24:45 2002
-l print map$$[$.++]=$ARGV[--$$[$;]||++$;,$;&1],1..pop
Playing with tiebreakers...
54.13 Jerome Quelin Sun May 5 06:49:46 2002
-l print map$$[--$_]=$ARGV[--$$[$;]||++$;,$;&1],1..pop
Re-YES! :-)
54.25 Rick Klement Sat May 4 19:55:12 2002
s/.?/$ARGV[1&pos]x$&||2/ge>>9?print$_&'?'x pop,$/:do$0
55.13 Jerome Quelin Sat May 4 17:29:57 2002
-l print map{--$$[$;]||++$;;$$[--$_]=$ARGV[$;&1]}1..pop
playing with tiebreakers...
55.15 Jerome Quelin Sat May 4 17:27:26 2002
-l print map{--$$[$;]or++$;;$$[--$_]=$ARGV[$;&1]}1..pop
YES!
55.25 Rick Klement Sat May 4 18:16:02 2002
-l s/.?/$ARGV[1&pos]x$&||2/ge<500?do$0:print$_&'?'x pop
56.12 Chris Dolan Thu May 2 14:43:02 2002
print$_?$.[$!++]=$ARGV[--$.[$.]||++$.,$.%2]:$/for-pop..0
56.12 BoB (Best of Breed - referees) Thu May 2 09:46:37 2002
-l print map($.[$!++]=$ARGV[--$.[$.]||++$.,$.%2],1..pop)
Yay!
56.18 Mtv Europe Tue May 7 12:27:17 2002
-l for$$(1..pop){$_.=$ARGV[1&grep$|<($$-=$_),/./g]}print
56.20 Mtv Europe Sun May 5 13:38:20 2002
-l for$$(1..pop){$_.=$ARGV[1&grep 0<($$-=$_),/./g]}print
56.25 Rick Klement Sat May 4 17:06:42 2002
-l s/.?/$ARGV[1&pos]x$&||2/ge<500?do$0:print$_&='?'x pop
57.14 Ton Hospel Sun May 5 17:46:50 2002
-l print eval'($_.=chop()x$+.$ARGV[$|--])=~/$&(.)/,'x pop
57.16 Ton Hospel Sun May 5 16:23:51 2002
-l print eval'($_.=chop()x$1.$ARGV[$|--])=~/$&(.)/,'x pop
57.18 Ton Hospel Wed May 1 04:46:24 2002
-l s/.?/$ARGV[1&pos]x($&||1)/eguntil/.{$ARGV[2]}/;print$&
57.18 Eirik Berg Hanssen Sat May 4 03:54:33 2002
s/.?/$ARGV[1&pos]x($&||1)/geuntil/.{$ARGV[2]}/;print$&,$/
57.20 Rick Klement Sat May 4 01:24:39 2002
s/./$ARGV[1&pos]x$&/ge*/.{$ARGV[$_||=2]}/?print$&,$/:do$0
58.12 Chris Dolan Wed May 1 22:25:15 2002
print$.[$!++]=$ARGV[--$.[$.]||++$.,$.%2]for 1..pop;print$/
58.12 Jerome Quelin Thu May 2 14:57:22 2002
-l print map{--$$[$;]or$;++,--$|;$$[--$_]=$ARGV[$|]}1..pop
58.16 Jay Tilton Tue May 7 23:15:05 2002
$;=pop;s/.?/$ARGV[1&pos]x($&||1)/eguntil/.{$;}/;print"$&
"
58.18 Jay Tilton Fri May 3 21:29:29 2002
-l $;=pop;s/.?/$ARGV[1&pos]x($&||1)/eguntil/.{$;}/;print$&
58.20 Greg Allen Tue May 7 20:38:52 2002
-l s/.?/$ARGV[1&pos]x($&||1)/eg until/.{$ARGV[2]}/;print$&
58.21 Lars Mathiesen Tue May 7 11:18:49 2002
-l $_.=2while$|=s/./$ARGV[--$|]x$&/ge<999;print$_&'?'x pop
58.21 MeowChow Tue May 7 22:34:05 2002
s/.?/$ARGV[1&pos]x$&||2/ge<999?do$0:print/(.{${\pop}})/,$/
58.22 MeowChow Sun May 5 21:52:50 2002
-l s/.?/$ARGV[1&pos]x$&||2/eg<500?do$0:print/(.{${\pop}})/
59.12 Chris Dolan Wed May 1 22:15:30 2002
print$.[$!++]=$ARGV[(--$.[$.]?$.:++$.)%2]for 1..pop;print$/
59.14 Marko Nippula Fri May 3 22:39:33 2002
s/.?/$ARGV[$|--]x($&||1)/eguntil$|=/.{$ARGV[2]}/;print"$&
"
Still better tie-score.
59.15 Lolly Pop Mon May 6 21:09:52 2002
map{@;[0..@;]=map{($ARGV[$|--])x$_}@;,@;;print}@;=1..pop,$/
59.16 Marko Nippula Fri May 3 21:55:21 2002
$_.=1,s/./$ARGV[$|--]x$&/eguntil$|=/.{$ARGV[2]}/;print"$&
"
Hmm. Yet another obvious optimization, rick below my nose and I almost didn't see it.
59.17 Rick Klement Fri May 3 20:50:20 2002
s/./$ARGV[1&pos]x$&/geuntil/(.{$ARGV[$_||=2]})./;print$+,$/
59.20 Daryl Olson Mon May 6 17:18:09 2002
s/.?/$ARGV[1&pos]x$&||1/eg until/(.{$ARGV[2]})./;print"$1
"
59.22 Jay Tilton Wed May 1 22:20:54 2002
-l $l=pop;s/.?/$ARGV[1&pos]x$&||1/eguntil/(.{$l})./;print$1
59.23 Greg Allen Fri May 3 01:54:17 2002
-l $c=pop;s/.?/$ARGV[1&pos]x($&||1)/eg until/.{$c}/;print$&
60.15 Chris Dolan Wed May 1 19:53:39 2002
for(1..pop){print$.[$_-1]=$ARGV[$.%2];--$.[$.]||++$.}print$/
60.15 Jerome Quelin Tue May 7 16:40:04 2002
-l $_.=$$[$.++]=$ARGV[--$$[$;]||++$;,$;&1]for($_)x pop;print
could this solution be the one?
60.18 Bass Tue May 7 23:55:34 2002
s/.?/$ARGV[$-[0]%2]x($&||1)/ge until/.{$ARGV[2]}/;print$&,$/
60.21 MeowChow Sat May 4 10:25:42 2002
-l {s/.?/$ARGV[1&pos]x$&||2/eg>999||redo}print/(.{${\pop}})/
60.23 Beijing.pm Tue May 7 20:39:40 2002
s/.|/$ARGV[(pos)%2]x$&||9/ge<999?do$0:printf"%.${\pop}s
",$_
61.11 Josef Drexler Sun May 5 07:12:34 2002
$%[$_]=$ARGV[$"],$*||=$%[++$.],$"^=!--$*for 1..pop;print@%,$/
61.16 Rick Klement Fri May 3 14:44:27 2002
$_=2;s/./$ARGV[$|--]x$&/geuntil$|=/(.{$ARGV[2]})./;print$+,$/
61.20 Michiel van Leeuwen Sun May 5 20:49:19 2002
$_=2;{s/./$ARGV[$-[0]%2]x$&/eg;/.{$ARGV[2]}/?print"$&
":redo}
61.25 Bass Fri May 3 17:56:12 2002
-l print map$x=(@x=(@x,@ARGV[($_&1)x--$x,--$_%2]))[$_],1..pop
62.11 Juho Snellman Tue May 7 11:54:29 2002
-l print map{-@@+push@@,($==$ARGV[$|--])x($@[$.++]||$=)}1..pop
62.16 Jasper McCrea Tue May 7 16:52:53 2002
s/.?/$ARGV[$"++%2]x($&||1)/eg until$"=/.{$ARGV[2]}/;print$&.$/
this improves my tiebreak slightly (hoo-ray, clap hands, run around squealing with glee)
62.19 Jasper McCrea Sat May 4 19:26:38 2002
s/.?/$ARGV[$i++%2]x($&||1)/eg until$i=/.{$ARGV[2]}/;print$&.$/
Finally! One whole character off kola. Beginning to think this is wrong method.
62.22 Ala Qumsieh Tue May 7 23:42:11 2002
$_[$_]=$ARGV[$|-=!--$z],$z>0or$z=$_[++$*]for 1..pop;print@_,$/
62.23 Josef Drexler Fri May 3 17:27:25 2002
-l map{@_[$_]=$ARGV[$x];$c||=$_[++$o];$x^=!--$c}1..pop;print@_
63.13 Qingning Huo Sat May 4 11:07:17 2002
-l print map{@.=(($?=$ARGV[$|--])x($.[-1]||$?),@.);pop@.}1..pop
63.13 Jerome Quelin Tue May 7 16:35:09 2002
-l s/$/$$[$.++]=$ARGV[--$$[$;]||++$;,$;&1]/egfor($_)x pop;print
A Cantor-like style...
63.13 Beijing.pm Tue May 7 06:27:11 2002
-l print map{$,[$_]=$"+=$_>$,[$/]?$?=$ARGV[$/++%2]:$?;$?}1..pop
63.13 Beijing.pm Tue May 7 06:33:40 2002
-l print map{$,[$_]=$"+=$_>$,[$/]?$?=$ARGV[$/++%2]:$?;$?}1..pop
63.14 Qingning Huo Sat May 4 09:27:17 2002
-l print map{push@.,($?=$ARGV[$|--])x($.[0]||$?);shift@.}1..pop
63.16 The Refs (pre-competition) Thu May 2 12:34:04 2002
-l print map{(map@/=(($_)x($/[--$%]||$_),@/),@ARGV)[-$_]}1..pop
By Sec
63.21 Ala Qumsieh Tue May 7 23:41:32 2002
map{$_[$_]=$ARGV[$|-=!--$z];$z>0or$z=$_[++$*]}1..pop;print@_,$/
63.22 MeowChow Fri May 3 04:22:33 2002
-l print map{-@_+push@_,($:=$ARGV[$_%2])x($_[$_]||$:)}0..-1+pop
63.22 Michiel van Leeuwen Sun May 5 20:44:25 2002
$_=2;a:s/./$ARGV[$-[0]%2]x$&/eg;/.{$ARGV[2]}/?print"$&
":goto a
63.23 Jasper McCrea Wed May 1 11:30:55 2002
-l $i=1,s/.?/$ARGV[$i^=1]x($&||1)/eg until/.{$ARGV[2]}/;print$&
64.14 Qingning Huo Sat May 4 08:27:36 2002
-l print map{push@.,($?=$ARGV[$|--])x($.=$.[$_-1]||$?);$.}1..pop
64.16 Amir Karger Tue May 7 20:07:41 2002
-l print map{push@@,($%=$ARGV[--$_%2])x($@=$@[$_]||$%);$@}1..pop
64.16 Benoît Chauvet Fri May 3 09:31:44 2002
-li1 map{push@,,$ARGV[$^I^=!$h];($h||=$,[$m++])--}1..pop;print@,
64.19 Marko Nippula Fri May 3 21:43:59 2002
$_.=1,s/./$ARGV[$|--]x$&/eguntil$|=s/(.{$ARGV[2]}).*/$1
/s;print
Resubmit, accidentally left stupid \n in the previous one. I was probably too happy for reaching below 100 Club.
64.22 Ala Qumsieh Tue May 7 23:39:51 2002
map{$_[$_]=$ARGV[$|-=!--$z];$z=$_[++$*]if$z<=0}1..pop;print@_,$/
64.23 Michiel van Leeuwen Sat May 4 21:47:25 2002
$_=2;a:s/./$ARGV[$-[0]%2]x$&/eg;/.{$ARGV[2]}/||goto a;print"$&
"
64.25 Amir Karger Tue May 7 05:51:44 2002
-l print map{push@c,($q=$ARGV[--$_%2])x($x=$c[$_]||$q);$x}1..pop
64.25 Amir Karger Tue May 7 19:36:14 2002
-l print map{push@c,($q=$ARGV[--$_%2])x($x=$c[$_]||$q);$x}1..pop
64.25 Greg Allen Wed May 1 19:41:37 2002
-l print map{push@a,($y=$ARGV[~$_&1])x($a[0]||$y);shift@a}1..pop
64.25 Matt Nelson Mon May 6 06:11:58 2002
-l print map{push@_,($n=$ARGV[$i%2])x($c=$_[$i++]||$n);$c}1..pop
65.11 Qingning Huo Thu May 2 22:01:41 2002
-l print map{chop($.=($?=$ARGV[$|--])x($.=~/.$/?$&:$?).$.)}1..pop
65.11 Qingning Huo Thu May 2 22:19:13 2002
-l print map chop($.=($?=$ARGV[$|--])x($.=~/.$/?$&:$?).$.),1..pop
65.11 Juho Snellman Sun May 5 12:04:11 2002
-l print map{$==$ARGV[$|--];-@@+push@@,($=)x($@[$.++]||$=)}1..pop
65.12 Juho Snellman Fri May 3 13:14:05 2002
-l print map{$==$ARGV[$|--];-@@+push@@,($=)x($@[--$_]||$=)}1..pop
65.17 Taipei.pm Thu May 2 18:35:52 2002
-l print+map+chop($*=($.=$ARGV[1&~$_])x chop($_=$..$*).$*),1..pop
65.19 Joost Diepenmaat Fri May 3 14:17:33 2002
-l $_.=($d=$ARGV[$|--])x(/./g,$d)[$f++]until/.{$ARGV[2]}/;print$&
65.20 Marko Nippula Fri May 3 21:39:49 2002
$_.=1,s/./$ARGV[$|--]x$&/eguntil$|=s/(.{$ARGV[2]}).*/$1\n/s;print
65.22 gimbo Fri May 3 01:50:36 2002
-l $_.=($k=$ARGV[$i&1])x(/./g,$k)[$i++]until/.{$ARGV[2]}/;print$&
65.23 Adam Spiers Tue May 7 18:54:46 2002
-l print map{push@a,($%=$ARGV[$_%2])x($n=$a[$_]||$%);$n}0..-1+pop
65.25 MeowChow Fri May 3 01:44:04 2002
-l print map{-$#_+push@_,($x=$ARGV[~$_&1])x(shift@_||$x-1)}1..pop
65.25 Matt Nelson Sat May 4 19:08:19 2002
-l print map{push@_,($n=$ARGV[$i%2])x($_[$i]||$n);$_[$i++]}1..pop
65.26 Amir Karger Tue May 7 03:51:22 2002
-l print map{push@c,($q=$ARGV[$_%2])x($x=$c[$_]||$q);$x}0..-1+pop
65.28 seano Fri May 3 19:25:22 2002
-l $n=pop;push@_,($_)x(@_,$_)[$i++]for(@ARGV)x$n--;print@_[0..$n]
...
66.11 Qingning Huo Thu May 2 21:57:34 2002
-l print map{$.=($?=$ARGV[$|--])x($.=~/.$/?$&:$?).$.;chop$.}1..pop
66.14 Peter Haworth Tue May 7 21:17:02 2002
-l push@,,($.=$ARGV[$|--])x($,[$_]||$.)for@/=0..-1+pop;print@,[@/]
66.14 Juho Snellman Fri May 3 03:31:20 2002
-l print map{$==$ARGV[$|--];-@@+push@@,($=)x($@[$_]||$=)}0..-1+pop
66.15 John McNamara Tue May 7 20:31:51 2002
print+(map{push@_,($-=$ARGV[$|--])x($==$_[--$_]||$-);$=}1..pop),$/
66.20 Joost Diepenmaat Thu May 2 13:39:28 2002
-l $c=pop;$_.=($d=$ARGV[$|--])x(/./g,$d)[$f++]until/.{$c}/;print$&
66.23 gimbo Fri May 3 01:02:55 2002
-l $l=pop;$_.=($k=$ARGV[$i&1])x(/./g,$k)[$i++]until/.{$l}/;print$&
66.23 Guillermo Sansovic Mon May 6 20:15:15 2002
-l push@r,($/=$ARGV[1&$i])x($s[$i++]=$r[$i]||$/)for 1..pop;print@s
66.25 Peter Haworth Thu May 2 14:28:01 2002
-l push@s,($n=$ARGV[$|--])x($s[$_]||$n)for@l=0..-1+pop;print@s[@l]
66.27 Mtv Europe Sun May 5 09:29:43 2002
push@a,($j=$ARGV[$_&1])x($a[$_]||$j)for@b=0..-1+pop;print@a[@b],$/
66.28 Philippe Bricout Sat May 4 13:52:15 2002
-l $l=pop;push@s,($_)x($s[$i++]||$_)for(@ARGV)x$l;print@s[0..--$l]
66.28 Ido Trivizki Tue May 7 21:19:17 2002
-l $o=pop;push@_,($_)x($_[$l++]||$_)for(@ARGV)x$o--;print@_[0..$o]
66.30 Ido Trivizki Wed May 1 13:58:53 2002
-l $o=pop;push@_,($_)x($_[$l++]||$_)for(@ARGV)x$o;print@_[0..$o-1]
67.13 Rick Klement Fri May 3 02:55:26 2002
($|,$_,$=)=@ARGV;s/./$ARGV[$|--]x$&/geuntil$|=/(.{$=})./;print$1,$/
67.13 Taipei.pm Thu May 2 00:44:41 2002
-l print+map{$*=~/.$/;chop($*=($.=$ARGV[~$_&1])x($&||$.).$*)}1..pop
67.16 Tony Young Mon May 6 23:53:22 2002
push@>,($.=@ARGV[$|--])x(@>,$.)[$_]for 0..500;print@>[0..-1+pop],$/
67.19 Petri Mikkelä Mon May 6 14:23:31 2002
-l $$=pop;s/.?/$ARGV[1&pos]x$&||$ARGV[0]/eg until/(.{$$})./;print$1
67.24 Guillermo Sansovic Mon May 6 19:52:00 2002
-l push@r,($/=$ARGV[1&$_])x($s[$_]=$r[$_]||$/)for 0..-1+pop;print@s
67.25 Daryl Olson Mon May 6 11:45:08 2002
-l $_=11;s/./$ARGV[1&pos]x$&/eg while$-[0]<999;print substr$_,0,pop
68.13 Chris Dolan Wed May 1 19:32:17 2002
for(1..pop){$.[$_-1]=$ARGV[$.%2];++$!-$.[$.]||($!=0,++$.)}print@.,$/
68.14 Eike Grote Mon May 6 07:45:34 2002
$_.=($,=$ARGV[$%%2])x((/./g)[$%++]||$,)until/.{$ARGV[2]}/;print$&.$/
68.15 Stephen Turner Sat May 4 12:01:21 2002
push@$,($$=$ARGV[$|--])x($$[$_]||$$)for 0..500;$#$=-1+pop;print@$,$/
68.15 Jerome Quelin Thu May 2 05:26:50 2002
-l print+map{push@$,($ARGV[$|--])x($.=$$[--$_]||$ARGV[$_]);$.}1..pop
a night to rest, and here we are...
68.16 Qingning Huo Wed May 1 22:51:33 2002
-l for$.(1..pop){s!!($?=$ARGV[$|--])x(/.$/?$&:$?)!e;$x.=chop}print$x
68.16 Tony Young Sun May 5 05:59:36 2002
map{push@>,($.=@ARGV[$|--])x(@>,$.)[$_]}0..500;print@>[0..-1+pop],$/
68.16 tinita Fri May 3 11:56:17 2002
-l print map{push@_,($%=$ARGV[$/^=1])x($\xa7=$_[$_-1]||$%);$\xa7}++$/..pop
68.18 Marko Nippula Thu May 2 11:58:02 2002
-l push@,,($.=$ARGV[$_%2])x($,[$_]||$.)for 0..$^H;print@,[0..pop()-1]
68.18 Eirik Berg Hanssen Wed May 1 09:04:20 2002
-l print map{push@$,($ARGV[--$_%2])x($@=$$[$_]||$ARGV[$_]);$@}1..pop
68.21 Michiel van Leeuwen Sat May 4 12:10:00 2002
$_=11;while(s/./$ARGV[my$i++%2]x$&/eg<501){}/.{$ARGV[2]}/;print"$&
"
68.24 Joost Diepenmaat Thu May 2 09:59:50 2002
-l $c='.'x pop;$_.=($d=$ARGV[$f%2])x(/./g,$d)[$f++]until/$c/;print$&
somewhat better :-)
68.24 Marcus Holland-Moritz Thu May 2 10:36:54 2002
push@_,($"=$ARGV[$_&1])x($_[$_]||$")for+0..500;$#_=-1+pop;print@_,$/
68.24 Guillermo Sansovic Mon May 6 18:37:59 2002
-l push@r,($/=$ARGV[1&$_])x($r[$_]||$/)for 0..333;print@r[0..-1+pop]
68.26 Daryl Olson Mon May 6 07:22:18 2002
-l $_=11;s/./$ARGV[1&pos]x$&/eg while 999>y///c;print substr$_,0,pop
68.26 Marcus Holland-Moritz Wed May 1 21:27:04 2002
push@x,($a=$ARGV[$_&1])x($x[$_]||$a)for+0..500;$#x=-1+pop;print@x,$/
68.29 Amir Karger Mon May 6 02:58:43 2002
-l $l=pop;map{push@c,($_)x($c[$b++]||$_)}(@ARGV)x$l;print@c[0..$l-1]
69.13 Chris Dolan Wed May 1 19:12:26 2002
for(1..pop){$.[$_-1]=$ARGV[$.%2];$.++,$!=0if($.[$.]<=++$!)}print@.,$/
69.13 Jerome Quelin Thu May 2 13:00:44 2002
-l print+map{@$=(@$,($ARGV[$|--])x($.=$$[--$_]||$ARGV[$_]));$.}1..pop
69.14 Qingning Huo Wed May 1 15:46:22 2002
for$i(1..pop){$_.=($?=$ARGV[$|--])x(/./?$&:$?),s/.//,print$&}print'
'
69.14 Juho Snellman Fri May 3 03:18:38 2002
-l print map{$==$ARGV[$|--];push@@,($=)x($@[$_]||$=);$@[$_]}0..-1+pop
69.15 Rick Klement Fri May 3 01:36:11 2002
$==pop;$_=$ARGV[1];s/./$ARGV[$|--]x$&/geuntil$|=/(.{$=})./;print$1,$/
69.19 Mickut Sun May 5 10:03:26 2002
push@@,($@=$ARGV[$_%2])x($@[$_]||$@)for 0..333;print@@[0..(pop)-1],$/
Learning how arrays work made this a lot shorter than my earlier attempt. The 0..333 gives 501+newline with 1&2, so the requirement for generating up to 500 char long sequences is met.
69.20 Prakash Kailasa Tue May 7 04:33:22 2002
$_=11;s!.!$ARGV[$-[0]%2]x$&!eg,s!(.{$ARGV[2]}).*!$1
!swhile--$=;print
69.20 Marko Nippula Thu May 2 12:17:41 2002
-l push@,,($.=$ARGV[$_%2])x($,[$_]||$.)for 0..332;print@,[0..pop()-1]
To S. Zhels mail: Oh, sorry, I didn't think of that case. I fixed my version of tpr03.pl to include case [ "1 2 500", "12211212212211211221211212211211212212211212212112112212211212212211211212212112212211212212211211221211212212211211212211211221211211221221121221211221221211211221221121221211211221211212211211212212112212211212212211211212211211221221211212211211221211211221221211212211211212212211212212112112212212112212211212212211211221211212212211212212112212211211212212211212212112212212112122112112212212112112212112122122112112212112112212212112122112112212212112212211212212211211221211212211211212212211\n" ], so that I no longer send faulty entries. This entry I send is just a basic fix for prob: 332 instead of $^H.
69.22 gimbo Thu May 2 19:27:05 2002
-l $l=pop;$_.=($k=$ARGV[$i&1])x((/./g)[$i++]||$k)until/.{$l}/;print$&
69.22 Taipei.pm Wed May 1 17:49:08 2002
-l print+map{$.=$ARGV[~$_%2];push@_,$.for 1..$_[0]||$.;shift@_}1..pop
69.23 Marko Nippula Fri May 3 13:58:20 2002
-l @_=(map{(@ARGV[$.++&1])x$_}@_,$.=2)[0..$ARGV[2]-1]for%{::};print@_
69.27 Peter Haworth Wed May 1 18:57:51 2002
-l @l=0..-1+pop;push@s,($c=$ARGV[$|--])x($s[$_]||$c)for@l;print@s[@l]
69.27 Guillermo Sansovic Mon May 6 17:55:25 2002
-l push@r,($t=$ARGV[$_&1])x($r[$_]||$t)for 0..333;print@r[0..pop()-1]
70.17 John McNamara Tue May 7 15:02:20 2002
print+(map{push@_,($ARGV[$|--])x($==$_[--$_]||$ARGV[$_]);$=}1..pop),$/
70.19 Ronald J Kimball Thu May 2 04:27:08 2002
-l push@_,($~=$ARGV[$|--])x($_[$-++]||$~)for a..kn;print@_[0..pop()-1]
70.19 Ronald J Kimball Thu May 2 04:39:01 2002
-l push@_,($~=$ARGV[$|--])x($_[$-++]||$~)for a..kn;print@_[0..pop()-1]
70.19 Prakash Kailasa Tue May 7 03:27:31 2002
$?=pop,$_=11;s!.!$ARGV[$-[0]%2]x$&!eg,s!(.{$?}).*!$1
!swhile--$=;print
70.20 John McNamara Tue May 7 14:56:17 2002
print+(map{push@_,($ARGV[$|--])x($x=$_[--$_]||$ARGV[$_]);$x}1..pop),$/
70.20 John McNamara Tue May 7 15:00:59 2002
print+(map{push@_,($ARGV[$|--])x($_=$_[--$_]||$ARGV[$_]);$_}1..pop),$/
70.24 RRBuonanno Tue May 7 11:11:42 2002
-l map{push@_,($%=$ARGV[$_%2])x($_[$_]||$%)}0..500;print@_[0..(pop)-1]
70.26 Amir Karger Thu May 2 12:50:27 2002
-l for(0..500){push@c,($q=$ARGV[$_%2])x($c[$_]||$q)}print@c[0..-1+pop]
70.26 Amir Karger Fri May 3 18:51:49 2002
-l for(0..500){push@c,($q=$ARGV[$_%2])x($c[$_]||$q)}print@c[0..-1+pop]
70.26 Daryl Olson Mon May 6 06:54:39 2002
-l $_=11;s/./$ARGV[pos()%2]x$&/eg while 999>y///c;print substr$_,0,pop
70.26 Marcus Holland-Moritz Wed May 1 14:37:40 2002
push@x,($a=$ARGV[$b&1])x($x[$b++]||$a)for+0..500;$#x=-1+pop;print@x,$/
70.26 Dr. Mu Thu May 2 22:37:51 2002
-l print map{push@v,($_)x($v[0]||$_);shift@v}map$ARGV[$_%2^1],(1..pop)
70.26 seano Fri May 3 18:10:22 2002
-l ($n,$")=pop;push@_,($_)x(@_,$_)[$i++]for(@ARGV)x$n--;print@_[0..$n]
more tweakage
70.27 Greg Allen Wed May 1 19:34:08 2002
-l *_=*ARGV;print map{push@a,($y=$_[~$_&1])x($a[0]||$y);shift@a}1..pop
70.29 Ido Trivizki Wed May 1 12:07:55 2002
-l $o=pop;push@_,($_)x($_[$l++]||$_)for(shift,pop)x$o;print@_[0..$o-1]
71.14 Jerome Quelin Wed May 1 17:30:57 2002
-l @==@ARGV;print+map{push@$,($=[$|--])x($.=$$[--$_]||$=[$_]);$.}1..pop
I have an headache now... Giving up for today!
71.16 Damien Neil Tue May 7 23:57:12 2002
-l @.=@ARGV;$.=1,s/./$.[$.^=1]x$&/ge,$_.=$.[!$.]until/.{$.[2]}/;print$&
71.17 Alain "TopMach" Dupuis Tue May 7 20:22:02 2002
for$"(1..pop){/.$/;$_=($-=$ARGV[$"-1&1])x($&||$-).$_;print chop}print$/
71.18 John McNamara Tue May 7 10:37:24 2002
print+(map{(@_=(@_,($ARGV[$|--])x($_[--$_]||$ARGV[$_])))[$_]}1..pop),$/
71.20 John McNamara Tue May 7 14:54:49 2002
print+(map{push@_,($ARGV[$|--])x($_[--$_]||$ARGV[$_]);$_[$_]}1..pop),$/
71.25 Michael Thelen Tue May 7 22:36:13 2002
-l $_.=($x=$ARGV[$i%2])x(/./g,$x)[$i++]while$i<500;print substr$_,0,pop
72.12 Honza Pazdziora Mon May 6 14:58:42 2002
$$=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$*++,1while!/.{$$}/;print$&,$/
72.13 Ala Qumsieh Fri May 3 13:36:52 2002
$_.=$ARGV[$$=!$$]x((/./g)[$*++]||$ARGV[$$])until/.{$ARGV[2]}/;print$&.$/
72.13 Ala Qumsieh Fri May 3 13:37:46 2002
$_.=$ARGV[$$=!$$]x((/./g)[$*++]||$ARGV[$$])until/.{$ARGV[2]}/;print$&.$/
72.15 Qingning Huo Wed May 1 15:40:46 2002
$0=pop;$?=$ARGV[$|--],$_.=$?x(/./?$&:$?),s/.//,print$&while$0--;print'
'
72.15 Alain "TopMach" Dupuis Tue May 7 15:31:21 2002
for$"(1..pop){/.$/;$_=($/=$ARGV[$"-1&1])x($&||$/).$_;$,.=chop}print"$,
"
72.16 Honza Pazdziora Fri May 3 16:17:00 2002
$l=pop;$.=$ARGV[$|--],$_.=$.x=substr$_.$.,$o++,1while!/.{$l}/;print$&,$/
72.17 Prakash Kailasa Tue May 7 02:48:59 2002
$?=pop,$_=11;$|=0,s/./$ARGV[$|--]x$&/eg,s|(.{$?}).*|$1
|swhile--$=;print
72.17 nashdj Sun May 5 06:24:08 2002
-l /.{$i}(.)/,$;=$ARGV[$i++%2],$_.=$;x($1||$;)until/.{$ARGV[2]}/;print$&
72.17 Damien Neil Tue May 7 23:47:34 2002
-l @.=@ARGV;$.=1,s/./$.[$.^=1]x$&/ge,$_.=$.[$.^1]until/.{$.[2]}/;print$&
72.18 Tony Young Fri May 3 05:57:34 2002
map{push@>,($ARGV[$|--])x(@>,$ARGV[$_])[$_]}0..500;print@>[0..-1+pop],$/
72.18 Juho Snellman Fri May 3 01:34:25 2002
map{$==$ARGV[$_&1];push@@,($=)x($@[$_]||$=)}0..666;print@@[z..-1+pop],$/
72.18 Alain "TopMach" Dupuis Tue May 7 15:29:39 2002
for$i(1..pop){/.$/;$_=($/=$ARGV[$i-1&1])x($&||$/).$_;$,.=chop}print"$,
"
72.18 Jerome Quelin Thu May 2 13:01:10 2002
-l print+map{$w.=$ARGV[$|--]x($.=substr($w,--$_,1)||$ARGV[$_]);$.}1..pop
72.19 John McNamara Tue May 7 08:54:09 2002
print+(map{(@_=(@_,($ARGV[$|--])x($_[$_]||$ARGV[$_])))[$_]}0..-1+pop),$/
72.19 Alain "TopMach" Dupuis Sat May 4 15:38:55 2002
for$i(1..pop){/.$/;$_=($/=$ARGV[$i-1&1])x($&||$/).$_;print chop}print"
"
72.21 Jasper McCrea Wed May 1 10:27:03 2002
-l while(!s/(.{$ARGV[2]}).*/$1/){$i=1;s/.?/$ARGV[$i^=1]x($&||1)/eg}print
took me far too long to get this bugger to work
72.25 Taipei.pm Tue May 7 23:57:50 2002
@_=@ARGV;$_||=$_[0].$_[1];s|.|$_[1&pos]x$&|eg;/.{$_[2]}/?print"$&
":do$0
grr. no time to optimize this.
72.26 Terje K Mon May 6 17:40:30 2002
-l push@a,($ARGV[$_%2])x($a[$_]||$ARGV[$_])for 0..999;print@a[0..-1+pop]
72.26 Greg Allen Wed May 1 19:05:53 2002
-l *_=*ARGV;print map{push@a,($y=$_[~$_&1])x($a[--$_]||$y);$a[$_]}1..pop
72.26 seano Fri May 3 06:25:53 2002
($n,$")=pop;@x=(@x,($_)x(@x,$_)[$i++])for(@ARGV)x$n--;print"@x[0..$n]\n"
and again.
72.27 Guillermo Sansovic Mon May 6 17:25:59 2002
-l push@r,($t=$ARGV[$_&1])x($r[$_]||$t)for 0..500;print@r[0..$ARGV[2]-1]
72.28 Philippe Bricout Thu May 2 17:21:24 2002
-l $l=pop;@t=(@ARGV)x$l;push@s,($_)x($s[$i++]||$_)for@t;$#s=--$l;print@s
73.13 Ala Qumsieh Thu May 2 01:56:41 2002
$_.=$ARGV[$|]x((/./g)[$*++]||$ARGV[$|]),$|--until/.{$ARGV[2]}/;print$&.$/
73.14 Jerome Quelin Thu May 2 14:30:44 2002
-l $==$ARGV[0];print map{--$$[$;]or$;++,$==$ARGV[--$|];$$[--$_]=$=}1..pop
73.18 Prakash Kailasa Tue May 7 01:51:01 2002
-l $?=pop,$_=11;$|=0,s/./$ARGV[$|--]x$&/eg,s/(.{$?}).*/$1/while--$=;print
73.19 Alain "TopMach" Dupuis Sat May 4 15:03:53 2002
for$i(1..pop){/(.)/;$_.=($/=$ARGV[$i-1&1])x=$1||$/;s/.//;print$&}print"
"
73.21 Stephen Turner Thu May 2 22:14:05 2002
-l push@b,($ARGV[$|--])x($b[$_]||$ARGV[!$|])for 0..500;print@b[0..-1+pop]
73.23 Michiel van Leeuwen Sat May 4 10:52:50 2002
$_=11;while($i<501){$i=0;s/./$ARGV[$i++%2]x$&/eg}/.{$ARGV[2]}/;print"$&
"
73.23 RRBuonanno Mon May 6 18:23:35 2002
-l map push(@_,($%=$ARGV[$_%2])x(@_[$_]||$%)),0..500;print @_[0..(pop)-1]
73.24 Joost Diepenmaat Thu May 2 09:15:47 2002
-l $c='.'x pop;$d=$ARGV[$f%2],$_.=$d x((/./g)[$f++]||$d)until/$c/;print$&
73.25 Taipei.pm Wed May 1 16:22:14 2002
-l $;=$ARGV[$_%2],push@_,map$;,1..$_[$_]||$;for 0..999;$#_=-1+pop;print@_
73.25 RRBuonanno Mon May 6 13:36:42 2002
-l map push(@_,($c=$ARGV[$_%2])x(@_[$_]||$c)),0..500;print @_[0..(pop)-1]
73.27 Alistair McGlinchy Wed May 1 22:05:45 2002
-l $l=pop;@l=(@l,($m=$ARGV[$|--])x($l[$_]||$m))for 0..$l;print@l[0..$l-1]
73.29 Dr. Mu Thu May 2 07:29:17 2002
-l @c=@ARGV;print map{push@v,($d=$c[$_%2])x($v[0]||$d);shift@v}0..$c[2]-1
74.18 Petri Mikkelä Thu May 2 15:41:16 2002
-l $c=pop;$_=join"",@ARGV;$|=0until~s/./$ARGV[$|--]x$&/eg&&/.{$c}/;print$&
74.18 Tony Young Fri May 3 01:26:07 2002
map{push@>,($ARGV[$|--])x($_<@>?@>:@ARGV)[$_]}0..500;print@>[0..-1+pop],$/
74.20 Alain "TopMach" Dupuis Sat May 4 03:39:21 2002
for$i(1..pop){/(.)/;$_.=($/=$ARGV[$i-1&1])x=$1||$/;s/.//;$g.=$&}print"$g
"
74.22 jynx Fri May 3 03:05:55 2002
push@1,($ARGV[$|--])x($1[$_]or$ARGV[$;++])for$1..332;print@1[0..-1+pop],$/
74.22 gimbo Thu May 2 16:51:44 2002
-l $l=pop;$_.=($k=$ARGV[$i%2])x(/.{$i}(.)/?$1:$k),$i++until/.{$l}/;print$&
74.23 Tony Young Fri May 3 01:21:59 2002
map{push@a,($ARGV[$|--])x($_<@a?@a:@ARGV)[$_]}0..500;$#a=-1+pop;print@a,$/
74.24 Michael Thelen Tue May 7 21:44:52 2002
-l $_.=($x=$ARGV[$i%2])x((/./g)[$i++]||$x)while$i<500;print substr$_,0,pop
74.24 Simulants Tue May 7 23:45:57 2002
@t=@ARGV;for(1..pop){print$u=$f[$p++]||$t[$|];push@f,($t[$|--])x$u}die"\n"
74.25 Terje K Sat May 4 18:21:45 2002
-l for(0..999){push@b,($ARGV[$_%2])x($b[$_]||$ARGV[$_])}print@b[0..-1+pop]
75.12 Karsten Sperling Wed May 1 13:39:43 2002
-l print map{$.=~s/.//;$..=($=^=$%||=($==pop)^pop)x($&||$=-1);$&||$=}1..pop
75.14 Eric Roode Mon May 6 20:06:15 2002
-l $.=pop;push@*,($==$ARGV[$%%2])x($*[$%++]||$=)while$%<$.;print@*[0..$.-1]
75.15 Honza Pazdziora Fri May 3 16:09:26 2002
$l=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$o++,1while!(/.{$l}/&&print$&,$/)
75.15 Chris Dolan Wed May 1 19:10:59 2002
@_=@ARGV;for(1..pop){$.[$_-1]=$_[$.%2];$.++,$!=0if($.[$.]<=++$!)}print@.,$/
75.17 Philippe 'BooK' Bruhat Mon May 6 07:34:45 2002
-l substr($@.=$ARGV[$|--],-1)x=substr$@,$_,1for 0..500;print substr$@,0,pop
Without the $$ trick
75.19 John McNamara Mon May 6 23:17:00 2002
print+(map{@_=(@_,($ARGV[$|--])x($_[$_]||$ARGV[$"++]));$_[$_]}0..-1+pop),$/
75.19 nashdj Wed May 1 10:07:19 2002
-l @_=@ARGV;/.{$i}(.)/,$;=$_[$i++%2],$_.=$;x($1||$;)until/.{$_[2]}/;print$&
75.20 Alain "TopMach" Dupuis Fri May 3 23:02:30 2002
for$i(1..pop){$/=$ARGV[$i-1&1];/(.)/;$_.=$/x=$1||$/;s/.//;$g.=$&}print"$g
"
75.21 Philippe 'BooK' Bruhat Mon May 6 14:58:43 2002
-l $@.=($.=$ARGV[$_%2])x(substr$@,$_,1 or$.)for 0..500;print substr$@,0,pop
75.25 Terje K Thu May 2 20:04:55 2002
-l for(0..999){push@b,($ARGV[$_%2])x($b[$_]||$ARGV[$_])}print@b[0..pop()-1]
75.27 Peter Haworth Wed May 1 18:44:06 2002
-l @l=0..-1+pop;@n=@ARGV;push@s,($c=$n[$|--])x($s[$_]||$c)for@l;print@s[@l]
75.29 Dr. Mu Thu May 2 06:35:52 2002
-l @c=@ARGV;print map{push@v,($d=$c[$_%2])x(@v?$v[0]:$d);shift@v}0..$c[2]-1
76.14 Eric Roode Mon May 6 20:05:28 2002
-l $.=pop;push@*,($==$ARGV[$%%2])x($*[$%++]||$=)while$%<$.;print@*[0..$.-1] 
76.16 Ronald J Kimball Thu May 2 03:50:35 2002
-l $_.=$ARGV[$|]x(substr$_,$-++,1or$ARGV[$|]),$|--until/.{$ARGV[2]}/;print$&
76.20 Philippe 'BooK' Bruhat Mon May 6 14:54:30 2002
-l $@.=($.=$ARGV[$_%2])x(substr($@,$_,1)||$.)for 0..500;print substr$@,0,pop
76.22 Alain "TopMach" Dupuis Fri May 3 19:34:51 2002
-l push@a,(($/=$ARGV[$_&1])x($a[$i++]||$/))=~/./gfor 0..pop;print@a[0..$i-2]
76.25 RRBuonanno Mon May 6 12:24:32 2002
-l map$o.=($c=$ARGV[$_%2])x(substr($o,$_,1)||$c),0..500;print substr$o,0,pop
76.26 Tom Hargreaves Thu May 2 15:43:52 2002
-l print map{$x=$a.$x;$e||=chop$x;--$e?$a:($a^=$b)^$b}2..pop,$b=pop^($a=pop)
76.26 Boris Prinz Tue May 7 19:12:55 2002
-l push@b,($ARGV[$_%2])x($b[$_]||$ARGV[$_%2])for(0..500);print@b[0..pop()-1]
76.28 Isaac Lin Sat May 4 16:18:07 2002
-l ($a,$b)=@ARGV;print map{push@s,($l=$_%2?$a:$b)x($s[0]||$l);shift@s}1..pop
77.11 Prakash Kailasa Fri May 3 03:57:33 2002
-l @|=@ARGV;$_.=$|[$|]x((/./g)[$?++]||$|[$|]),$|--while$|[2]--;print/(.{$?})/
77.15 Michael Wrenn Mon May 6 02:35:48 2002
-l until(/.{$ARGV[2]}/&&print$&){/.{$b}(.)/;$^=$ARGV[$b++%2];$_.=$^x($1||$^)}
77.18 Philippe 'BooK' Bruhat Mon May 6 14:08:34 2002
-l ($@.=$ARGV[$|--])=~s/.$/$&x substr$@,$_,1/efor 0..500;print substr$@,0,pop
77.18 mathieu longtin Wed May 1 18:38:27 2002
$/=$ARGV[1-$_%2],$*.=$/x($2||$/),$*=~s/(.)(.?)/$2/,print$1for 1..pop;print'
'
77.19 Honza Pazdziora Thu May 2 12:04:45 2002
$l=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$o++,1 while$o<$l;print/(.{$l})/,$/
77.19 Alain "TopMach" Dupuis Thu May 2 22:07:46 2002
-l for$i(0..pop){/(.{$i})(.)/;$r=$1||$/;$_.=($/=$ARGV[$i&1])x($2||$/)}print$r
77.19 tinita Fri May 3 10:20:11 2002
-l $/=1;$%=$ARGV[$/^=1],push@_,($%)x($_[$\xa7++]||$%)for@%=0..-1+pop;print@_[@%]
77.20 jynx Fri May 3 00:20:53 2002
--$|;push@1,($ARGV[--$|])x($1[$_]or$ARGV[$|])for$-..332;print@1[0..-1+pop],$/
77.21 Philippe 'BooK' Bruhat Mon May 6 14:11:15 2002
-l eval'$_.=$ARGV[$|--];s/.$/$&x substr$_,$i++,1/e;'x500;print substr$_,0,pop
77.25 David Newcum Fri May 3 12:31:39 2002
-l map{$s.=($a=$ARGV[$_%2])x(substr($s,$_,1)||$a)}0..999;print substr$s,0,pop
Constant run time. :)
77.25 seano Fri May 3 06:07:55 2002
($n,$")=pop@ARGV;@x=(@x,($_)x(@x,$_)[$i++])for(@ARGV)x$n--;print"@x[0..$n]\n"
marginally better...
77.26 Greg Allen Wed May 1 19:00:32 2002
-l *_=*ARGV;print map{push@a,($y=shift)x($a[--$_]||$y);$_[1]=$y;$a[$_]}1..pop
78.15 jynx Thu May 2 23:51:23 2002
--$|;map@;=(@;,($ARGV[--$|])x($;[$_]||$ARGV[$|])),0..332;print@;[0..-1+pop],$/
78.17 Jerome Quelin Thu May 2 13:01:38 2002
-l map{push@$,($ARGV[$|--])x($.=$$[--$_]||$ARGV[$_])}1..500;print@$[0..-1+pop]
78.20 Alain "TopMach" Dupuis Thu May 2 21:18:09 2002
-l for$i(0..pop){/.{$i}(.)/;$_.=($/=$ARGV[$i&1])x($1||$/);$j=$i}print/(.{$j})/
78.21 Benoît Chauvet Fri May 3 08:59:36 2002
-l ($a,$p,$l)=@ARGV;map{push@,,($u^=!$h)?$a:$p;($h||=$,[$m++])--}1..$l;print@,
78.23 Tony Young Fri May 3 00:05:55 2002
map{push@a,($ARGV[$|--])x($_<@a?$a[$_]:$ARGV[$_])}0..500;$#a=-1+pop;print@a,$/
78.25 Joost Diepenmaat Wed May 1 15:05:51 2002
-l $c='.'x pop;$d=$ARGV[$f%2],$_.=$d x(substr($_,$f++,1)||$d)until/$c/;print$&
attempt #2 : slightly better
78.28 Jed Davis Fri May 3 08:55:03 2002
-l $n=pop;@l=@a=@ARGV;$i=0until(@l=map{($a[$i++&1])x$_}@l)>$n;print@l[0..--$n]
Interestingly, the solutions I've written using lists always seem to wind up smaller than the ones with strings.
79.11 Mickut Sat May 4 09:39:07 2002
$%=pop;for$%(0..$%){$,=$ARGV[$%%2];$_.=$,x(/.{$%}(.)/?$+:$,)}/.{$%}/;print$&.$/
I know there is a way to make it shorter, but I can't make it work :-)
79.15 Jerome Quelin Wed May 1 15:51:29 2002
-l @==@ARGV;print+map{push@$,($=[$|--])x($.=--$_?$$[$_]||$=[1]:$=[0]);$.}1..pop
79.16 Jerome Quelin Wed May 1 14:45:42 2002
-l print+map{push@$,($ARGV[$|--])x($.=--$_?$$[$_]||$ARGV[1]:$ARGV[0]);$.}1..pop
That's what I told you! :)
79.17 mathieu longtin Wed May 1 17:56:03 2002
$/=$ARGV[($_-1)%2],$*.=$/x($2||$/),$*=~s/(.)(.?)/$2/,print$1for 1..pop;print'
'
79.18 Philippe 'BooK' Bruhat Mon May 6 06:02:20 2002
-l $@.=$ARGV[$|--],substr($@,-1,1)x=substr$@,$_,1for 0..$$;print substr$@,0,pop
79.21 Alain "TopMach" Dupuis Thu May 2 20:46:41 2002
-l $c=pop;for$i(0..$c){/.{$i}(.)/;$/=$ARGV[$i&1];$_.=$/x($1||$/)}print/(.{$c})/
79.23 Philippe 'BooK' Bruhat Mon May 6 14:45:12 2002
-l $_.=$ARGV[$|--],s/.$/$&x substr$_,$i-1,1/ewhile$i++<500;print substr$_,0,pop
79.23 David Lowe Fri May 3 01:34:43 2002
-l --$|,push@l,map$ARGV[!$|],1..$l[$_]||$ARGV[$_]for 0..500;print@l[0..pop()-1]
79.25 David Newcum Fri May 3 05:23:17 2002
-l map{$a=$ARGV[$_%2];$s.=$a x(substr($s,$_,1)||$a)}0..999;print substr$s,0,pop
79.25 Step McGorm Sun May 5 23:57:27 2002
@a=@ARGV;s//@a/;while($i<666){$i=0;s/./$a[$i++&1]x$&/ge}s|.{$a[2]}|print$&,$/|e
79.25 Michael Thelen Tue May 7 18:54:10 2002
-l $_.=($x=$ARGV[$t])x substr$_.$x,$i++,1,$t^=1while$i<500;print substr$_,0,pop
No comment.
79.26 Greg Allen Wed May 1 17:08:33 2002
-l *_=*ARGV;print map{push@a,($y=shift)x($a[--$_]||$y);$_[1]=$y;$a[$_]}(1..pop)
79.27 Step McGorm Sun May 5 23:54:37 2002
-l @a=@ARGV;s//@a/;while($i<666){$i=0;s/./$a[$i++&1]x$&/ge}s/.{$a[2]}/print$&/e
80.09 Qingning Huo Wed May 1 14:10:41 2002
($!,$?,$$)=@ARGV;$!^=$?;$_.=($?^=$!)x(/./?$&:$?),s/.//,print$&while$$--;print'
'
80.13 Eric Roode Fri May 3 18:05:52 2002
-l $.=pop;@*=@%=@ARGV;@*=map{($%[$==!$=])x$_}@*,$==1while$.>=@*;print@*[0..$.-1]
The new tiebreaker rules make for some seriously ugly variable name choices. ;-)
80.14 Matthew Byng-Maddick Thu May 2 10:40:32 2002
-l *,=*ARGV;($,.=$,[$|])=~s,.,,,$,.=$,[$|--]x($&-1),$_.=$&while$,[2]>y|||c;print
a few chars at a time, but there must be a better algorithm
80.15 Jerome Quelin Wed May 1 14:27:07 2002
-l ($;,$")=@ARGV;print+map{push@$,(--$_%2?$":$;)x($.=$_?$$[$_]||$":$;);$.}1..pop
Nah, here I am!
80.16 Ala Qumsieh Thu May 2 01:49:53 2002
-l $_.=$ARGV[$|]x((/./g)[$i++]||$ARGV[$|]),$|--until s/(.{$ARGV[2]}).*/$1/;print
80.17 Eirik Berg Hanssen Wed May 1 07:42:33 2002
-l ($-,$*)=@ARGV;print map{push@_,(--$_%2?$*:$-)x($/=$_?$_[$_]||$*:$-);$/}1..pop
80.19 Philippe 'BooK' Bruhat Mon May 6 06:01:51 2002
-l $@.=$ARGV[$|--],substr($@,-1,1)x=substr$@,$_,1for 0..500;print substr$@,0,pop
80.20 Philippe 'BooK' Bruhat Mon May 6 14:11:05 2002
-l eval'($_.=$ARGV[$|--])=~s/.$/$&x substr$_,$i++,1/e;'x500;print substr$_,0,pop
80.21 Rick Klement Wed May 1 18:47:08 2002
@_[1,0]=@ARGV;$==$_[--$|],map($_[++$i]=$=,1..$_||$=),print for@_[1..pop];print$/
80.21 Michiel van Leeuwen Fri May 3 18:23:42 2002
 $_=11;while(y///c<501){$|=0;s/(.)/$ARGV[$|--]x$1/eg}/^(.{$ARGV[2]})/;print"$1
"
80.22 Philippe 'BooK' Bruhat Mon May 6 14:51:43 2002
-l $@.=$ARGV[$_%2]x(substr($@,$_,1)||$ARGV[$_%2])for 0..500;print substr$@,0,pop
80.22 Jerome Quelin Thu May 2 13:02:06 2002
-l $w.=$ARGV[$|--]x(substr($w,--$_,1)||$ARGV[$_])for 1..500;print substr$w,0,pop
80.24 Alain "TopMach" Dupuis Thu May 2 20:42:53 2002
-l $c=pop;for$i(0..$c){/.{$i}(.)/;$a=$ARGV[$i&1];$_.=$a x($1||$a)}print/(.{$c})/
80.26 Damien Neil Tue May 7 22:13:21 2002
-l @a=@ARGV;push@s,($a[$x++%2])x($s[$i++]||shift)until@s>500;print@s[0..pop()-1]
80.31 Michael Robinson Wed May 1 22:41:01 2002
-l @A=@ARGV;push@a,($A[$_%2])x($a[$_]||$A[$_%2])for 0..$A[2];print@a[0..$A[2]-1]
80.31 Michael Robinson Thu May 2 05:45:01 2002
-l @A=@ARGV;$z=$A[$_%2],push@a,($z)x($a[$_]||$z)for 0..$A[2];print@a[0..$A[2]-1]
81.17 Eike Grote Fri May 3 09:04:36 2002
$n=pop;$f=($==pop)^pop;$_.=($=^=$f)x((split'')[$i++]||$=)until/.{$n}/&&print$&.$/
81.20 Philippe 'BooK' Bruhat Mon May 6 06:01:26 2002
-l $@.=$ARGV[$|--],substr($@,-1,1)x=substr$@,$_,1 for 0..500;print substr$@,0,pop
81.22 Jay Tilton Wed May 1 06:19:11 2002
-l ($",$e,$l)=@ARGV;$_=$"x$".$e;$c=1,s/./(++$c%2?$e:$")x$&/eguntil/.{$l}/;print$&
81.23 Tony Young Thu May 2 08:27:28 2002
map{push@a,($ARGV[$|--])x($_<@a?$a[$_]:$ARGV[$_])}0..($c=pop);$#a=$c-1;print@a,$/
81.23 Benoît Chauvet Fri May 3 08:49:27 2002
-l ($a,$p,$l)=@ARGV;map{push@,,($u^=!$c)?$a:$p;$c=$,[$z++]-1if!$c--}1..$l;print@,
81.25 Philippe 'BooK' Bruhat Mon May 6 06:01:05 2002
-l $a.=$ARGV[$|--],substr($a,-1,1)x=substr$a,$_,1 for 0..500;print substr$a,0,pop
81.25 Yoav Goldberg Sat May 4 00:02:09 2002
-l for(0..pop){@s=(@ARGV)x999;push@a,($s[$i++])x($a[$_]||$s[$_])}print@a[0..$i-2]
81.25 Yoav Goldberg Sat May 4 09:49:01 2002
-l for(0..pop){@s=(@ARGV)x999;push@a,($s[$i++])x($a[$_]||$s[$_])}print@a[0..$i-2]
81.25 Michael Thelen Tue May 7 18:14:41 2002
-l $_.=$ARGV[$t]x substr$_.$ARGV[$t],$i++,1,$t^=1while$i<500;print substr$_,0,pop
Dang substr and ARGV! I hate them! Hate them, I say!
81.25 Damien Neil Tue May 7 21:58:18 2002
-l @a=@ARGV;push@s,($a[$x++%2])x($s[$i++]||shift)until@s>500;print@s[0..pop()-1];
81.27 giorgos zervas Tue May 7 16:47:25 2002
-l @K=@ARGV;for$i(0..500){for(1..$K[$i]){$K[$p++]=$ARGV[$i%2]}}print@K[0..-1+pop]
81.28 Peter Haworth Wed May 1 17:49:07 2002
-l (@n[0,1],$l)=@ARGV;push@c,($c=$n[$|--])x($c[$_]||$c)for 0..$l;print@c[0..$l-1]
81.29 Dale Hagglund Sat May 4 06:28:46 2002
-l @a=@ARGV;print map{$n=$a[$_%2];push@d,$n for 1..$d[0]||$n;shift@d;}0..$a[2]-1;

82.18 Ala Qumsieh Thu May 2 01:46:11 2002
-l @_=@ARGV;{$_.=$_[$|]x((/./g)[$i++]||$_[$|]);$|--;s/(.{$_[2]}).*/$1/||redo}print
82.20 mathieu longtin Wed May 1 16:33:00 2002
-l $/=$ARGV[$_%2],$*.=$/x(substr($*,$_,1)||$/)for 0..500;print substr$*,0,pop@ARGV
82.24 Benoît Chauvet Fri May 3 08:43:16 2002
-l ($a,$b,$l)=@ARGV;map{push@,,($u^=1>$c)?$a:$b;$c=$,[$z++]-1if!$c--}1..$l;print@,
Sorry, last solution submitted was an error !
82.24 Alain "TopMach" Dupuis Wed May 1 22:35:27 2002
-l $c=pop;for$i(0..$c){/.{$i}(.)/;$_.=$ARGV[$i&1]x($1||$ARGV[$i&1])}print/(.{$c})/
82.25 Tony Young Thu May 2 08:23:59 2002
$c=pop;map{push@a,($ARGV[$|--])x($_<@a?$a[$_]:$ARGV[$_])}0..$c;$#a=$c-1;print@a,$/
82.25 Eric Roode Fri May 3 01:47:58 2002
-l $e=pop;$i=$ARGV[$==!$=],push(@o,($i)x($o[$o++]||$i))while@o<$e;print@o[0..$e-1]
Ugly. I think I have a better way, but I wanted to just get on the board. :-)
82.26 z0ned Thu May 2 06:41:08 2002
-l @d=@ARGV;while($d[2]--){$b[$n++]=$d[$m%2];if($i++==$b[$m]-1){$i=0;$m++}}print@b
82.26 giorgos zervas Sat May 4 12:29:35 2002
-l @K=@ARGV;for$i(0..500){for(1..$K[$i]){$K[$p++]=$ARGV[$i%2]}}print@K[0..(pop)-1]
82.27 Alistair McGlinchy Wed May 1 21:57:14 2002
-l ($x,$y,$l)=@ARGV;@l=(@l,($m=--$|?$x:$y)x($l[$_]||$m))for 0..$l;print@l[0..$l-1]
82.27 Evan A. Zacks Sun May 5 23:26:15 2002
-l ($a,$b,$t)=@ARGV;map{push@a,($c=$|--?$b:$a)x($a[$_]||$c)}0..$t;print@a[0..$t-1]
82.29 Ido Trivizki Wed May 1 11:38:24 2002
-l ($c,$d,$o)=@ARGV;for$0(($c,$d)x$o){push@_,($0)x($_[$l++]||$0)};print@_[0..$o-1]
83.13 Ken Rockot Thu May 2 18:05:43 2002
-l $?=pop;$_.=($"=$ARGV[$x&1])x($:=($/=(/./g)[$x++]||$")>$??$?:$/)while$?-=$:;print
83.14 Matthew Byng-Maddick Thu May 2 09:43:05 2002
-l *;=*ARGV;$,.=$;[$|],$,=~s,.,,,$_.=$&,$,.=$;[$|--]x($&-1)while$;[2]>y|||c;print  
still too long, but a bit better
83.20 Patrick Gaskill Fri May 3 14:47:44 2002
-l for(;@o<501;++$c,$|--){push@o,($ARGV[$|])x($o[$c]||$ARGV[$|])}print@o[0..-1+pop]
83.22 Philippe 'BooK' Bruhat Mon May 6 14:44:45 2002
-l do{$_.=$ARGV[$|--];s/.$/$&x substr$_,$i,1/e}while($i++<500);print substr$_,0,pop
83.23 Robert Mah Mon May 6 22:54:37 2002
-l $n=pop;do{/.{$i}(.)/,$b=$ARGV[$i%2],$_.=$b x($1||$b)}while$i++<$n;print/(.{$n})/
83.24 Michael Thelen Tue May 7 15:54:02 2002
-l $_.=($x=$ARGV[$x==$ARGV[0]])x substr$_.$x,$i++,1while$i<500;print substr$_,0,pop
Fourth try. Dang substrs. I need to get rid of them.
83.25 Benoît Chauvet Thu May 2 12:23:10 2002
-l ($a,$b,$l)=@ARGV;map{push@,,($u^=1>$c)?$a:$b;$c=($c?$c:$,[$z++])-1}1..$l;print@,
83.26 giorgos zervas Thu May 2 15:13:44 2002
-l @K=@ARGV;for $i(0..500){for(1..$K[$i]){$K[$p++]=$ARGV[$i%2]}}print@K[0..(pop)-1]
83.27 Steve Rushe Fri May 3 09:03:44 2002
-l @a=@ARGV;map{$/=$a[$_%2];push@d,$/for 1..$d[$_]||$/}0..$a[2];print@d[0..$a[2]-1]
83.30 Eirik Berg Hanssen Wed May 1 06:47:54 2002
-l ($x,$y,$z)=@ARGV;print map{push@x,($_%2?$y:$x)x($x[$_]or$_?$y:$x);$x[$_]}0..$z-1
83.30 Guillermo Sansovic Sat May 4 19:29:51 2002
-l ($c,$b,$n)=@A=@ARGV;$c=(@r=(@r,($A[~$_&1])x$c),$b)[$_]for 1..$n;print@r[0..$n-1]
84.21 Jean-Pierre Vidal Tue May 7 22:52:55 2002
-l sub x{push@t,$ARGV[$i%2];$;--}$;=pop;while($;){x;$;&&x for 2..$t[$i];$i++}print@t
the last...
84.21 gimbo Wed May 1 20:30:01 2002
-l ($_,$,,$l)=@ARGV;$_ x=$_;$_.=$ARGV[++$i%2]x(/.{$i}(.)/?$1:$,)until/.{$l}/;print$&
84.24 Philippe 'BooK' Bruhat Thu May 2 13:57:48 2002
-l $"="";@_=(@ARGV[0,1])x500;$_[$_]x=substr"@_",$_,1for 0..@_;print substr"@_",0,pop
84.26 Jean-Pierre Vidal Tue May 7 15:16:35 2002
-l sub x{push@t,$ARGV[$i%2];$l--}$l=pop;while($l){x;$l&&x for 2..$t[$i];$i++}print@t
84.26 Dave Tweed Tue May 7 14:58:02 2002
-l ($s,$t,$n)=@ARGV;$_=$s.$t;$p="$t$s"x$n,s/./chop($p)x$&/eg until/(.{$n})./;print$1
84.28 Yoav Goldberg Fri May 3 23:06:26 2002
-l $c=pop;@s=(@ARGV)x$c;for(0..--$c){push@a,($s[$_])x($a[$_]||$s[$_])}print@a[0..$c]
84.29 Guillermo Sansovic Sat May 4 18:21:06 2002
-l ($c)=@A=@ARGV;$c=(@r=(@r,($A[~$x%2])x$c),$A[1])[$x=$_]for 1..pop;print@r[0..$x-1]
84.32 Eirik Berg Hanssen Wed May 1 06:27:44 2002
-l ($x,$y,$z)=@ARGV;push@x,($_%2?$y:$x)x($x[$_]or$_?$y:$x)for 0..$z;print@x[0..$z-1]
85.22 Philippe 'BooK' Bruhat Mon May 6 06:00:45 2002
-l for(0..500){$a.=$ARGV[$|--];substr($a,-1,1)x=substr($a,$_,1) }print substr$a,0,pop

ah something original!
85.23 Rick Klement Wed May 1 16:29:47 2002
(@_[1,0],$n)=@ARGV;$==$_[--$|],map$_[++$i]=$=,1..$_||$=for@_[1..$n];print@_[1..$n],$/
85.25 Philippe 'BooK' Bruhat Thu May 2 10:14:49 2002
-l $"="";@a=(@ARGV[0,1])x500;$a[$_]x=substr"@a",$_,1 for 0..@a;print substr"@a",0,pop
85.25 Alain "TopMach" Dupuis Wed May 1 22:19:01 2002
-l $c=pop;@a=@ARGV;for$i(0..$c){/.{$i}(.)/;$_.=$a[$i&1]x($1||$a[$i&1])}print/(.{$c})/
85.26 Peter Makholm Thu May 2 13:08:34 2002
-l ($x,$y,$a)=@ARGV;push@f,($|--?$y:$x)x($f[$_]||$|*$x||$y)for 0..$a;print@f[0..$a-1]
85.26 tinita Thu May 2 23:44:20 2002
-l $p=pop;$/=1;$x=$ARGV[$/^=1],push@_,($x)x($_[$c++]||$x)
while@_<$p;print@_[0..$p-1]
85.26 Dave Tweed Fri May 3 14:29:32 2002
-l ($s,$t,$n)=@ARGV;$_=$s.$t;$p="$t$s"x$n,s/./chop($p)x$&/eg until/(.{$n})./;print$1;
85.27 Daryl Olson Mon May 6 04:59:33 2002
-l @a=@ARGV;$_=$a[0].$a[1];s/./$a[pos()%2]x$&/eg while 999>y///c;print substr$_,0,pop
86.12 Phil Radden Tue May 7 19:15:21 2002
-l ($%,$.,$=)=@ARGV;($.,$%)=($%,$.),push@.,($.)x($.[$_]||$.)for 0..$=;print@.[0..$=-1]
86.26 Jean-Pierre Vidal Tue May 7 10:54:58 2002
-l sub x{push@t,$ARGV[$i];$l--}$l=pop;while($l){x;$l&&x for 2..$t[$j++];$i=!$i}print@t
86.26 Philippe 'BooK' Bruhat Thu May 2 10:12:43 2002
-l $"=$_;@a=(@ARGV[0,1])x500;$a[$_]x=substr("@a",$_,1)for 0..@a;print substr"@a",0,pop
86.26 Michiel van Leeuwen Fri May 3 14:50:03 2002
 @q=@ARGV;for(0..500){$a=$q[$_%2];push(@p,($a)x($p[$_]||$a))}print@p[(0..$q[2]-1)],"
"
86.26 Jon Coppeard Tue May 7 21:16:46 2002
@a=@ARGV;push@c,($a[$e&1])x@{$e<=@c?@c:@a}[$e++]while(@c<$a[2]);print@c[0..--$a[2]],$/
86.28 Michael Robinson Wed May 1 21:11:58 2002
-l ($b,$a,$c)=@ARGV;push@a,($a)x(($a,$b)=($b,$a),$a[$_]||$a)for 0..$c;print@a[0..$c-1]
86.28 Daryl Olson Mon May 6 04:32:05 2002
-l @a=@ARGV;$_=$a[0].$a[1];s/./$a[my$f++%2]x$&/eg while 999>y///c;print substr$_,0,pop
86.28 Greg Allen Wed May 1 13:13:36 2002
-l *_=*ARGV;$c=pop;for(0..$c){push@a,($y=shift)x($a[$_]||$y);$_[1]=$y}print@a[0..$c-1]
87.13 Matthew Byng-Maddick Wed May 1 17:17:40 2002
-l *;=*ARGV;@,=(@,,$;[$|]),$_.=$"=shift@,,push@,,($;[$|--])x--$"while y|||c<$;[2];print
and another few chars off.
87.15 Peter Haworth Wed May 1 13:54:54 2002
-l (@=[0,1],$#c)=@ARGV;$==$=[$|--],$,.=$=x substr$,.$=,$.++,1for@c;print substr$,,0,$#c
87.19 David Lowe Thu May 2 21:59:00 2002
($,)=@a=@ARGV;$,x=$,;$,.=$a[--$|]x(substr$,,$_,1or$a[1])for 1..500;printf"%.*s
",pop,$,
87.20 Qingning Huo Wed May 1 11:11:30 2002
($x,$y,$l)=@ARGV;while($l--){$_.=$x
x(/./?$&:$x);s/.//;print$&;($x,$y)=($y,$x)}print'
'
87.21 Chris Dolan Wed May 1 17:24:31 2002
@_=@ARGV;$_.=$_[$.%2]x(substr($_,$.++,1)||$_[$.-1])while($.<$_[2]);print/^.{$_[2]}/g,$/
87.25 Philippe 'BooK' Bruhat Wed May 1 17:22:01 2002
-l @a=@ARGV;$z.=$a[$|--]x(substr($z,$i++,1)||$a[$j++])for 1..250;print substr$z,0,$a[2]
87.25 Ido Trivizki Wed May 1 11:23:14 2002
-l ($c,$d,$o)=@ARGV;$n.=$_ x(substr($n,$l++,1)||$_)for($c,$d)x 250;print $n=~/(.{$o})/;
87.26 Peter Makholm Thu May 2 11:13:07 2002
-l ($x,$y,$a)=@ARGV;push@f,($|--?$y:$x)x($f[$_]||($|?$x:$y))for(0..$a);print@f[0..$a-1]
87.28 Guillermo Sansovic Sat May 4 16:05:11 2002
-l ($c)=@A=@ARGV;$c=(@r=(@r,($A[($x=$_++)%2])x$c),$A[1])[$_]for 0..pop;print@r[0..$x-1]
87.28 David Newcum Fri May 3 05:18:38 2002
-l @A=@ARGV;map{$a=$A[$_%2];$s.=$a x(substr($s,$_,1)||$a)}0..pop;print substr$s,0,$A[2]
88.15 Matthew Byng-Maddick Wed May 1 17:08:55 2002
-l *;=*ARGV;@,=(@,,$;[$|]),$_.=$a=shift@,,push@,,($;[$|--])x--$a while y|||c<$;[2];print
still *way* too long but worth submitting at this point
88.23 Philippe 'BooK' Bruhat Wed May 1 17:20:58 2002
-l @a=@ARGV;eval'$z.=$a[$|--]x(substr($z,$i++,1)||$a[$j++]);'x250;print substr$z,0,$a[2]
88.24 Tony Young Thu May 2 02:55:57 2002
$c=pop;$|=1;map{push@a,($ARGV[--$|])x($_<@a?$a[$_]:$ARGV[$_])}0..$c;$#a=$c-1;print@a,"
"
88.24 David Lowe Wed May 1 22:54:14 2002
($a,$b)=@ARGV;$a x=$a;$a.=$ARGV[--$|]x(substr$a,$_,1or$b)for 1..500;printf"%.*s
",pop,$a
88.24 z0ned Thu May 2 03:20:31 2002
-l @d=@ARGV;$==pop@d;while($=--){$b[$n++]=$d[$m%2];if($i++==$b[$m]-1){$i=0;$m++}}print@b
88.26 Peter Makholm Thu May 2 13:08:09 2002
-l ($x,$y,$a)=@ARGV;push@f,($|--?$y:$x)x($f[$_]||$|*$x||$y)for    0..$a;print@f[0..$a-1]
88.28 Greg Allen Wed May 1 11:27:57 2002
-l ($x,$y,$c)=@ARGV;for(0..$c){push@a,($x)x($a[$_]||$x);($x,$y)=($y,$x)}print@a[0..$c-1]
89.17 Ala Qumsieh Wed May 1 22:28:41 2002
-l $*=pop;@_=@ARGV;{$_.=$_[$|]x(substr$_,$.++,1or$_[$|]);$|--;s/(.{$*}).*/$1/||redo}print
89.22 Mickut Fri May 3 19:19:24 2002
($s,$b,$t)=@ARGV;for$,(($s,$b)x$t){$_.=$,x(substr($_,$u++,1)||$,)}s/(.{$t}).*/$1\n/;print
Still room for improvement, but figuring out how to use the arrays at all made it a bit shorter.
89.24 Philippe Bricout Wed May 1 21:05:12 2002
-l for(($a,$b,$l)=@ARGV;$l--;($a,$b)=($b,$a)){push@s,($a)x($s[$p++]||$a)}print@s[0..--$p]
89.26 Phil Radden Wed May 1 10:16:16 2002
($a,$b,$c)=@ARGV;for(0..$c){push@_,($a)x($_[$_]||$a);($a,$b)=($b,$a)}print@_[0..$c-1],"
"
90.18 Alain "TopMach" Dupuis Wed May 1 21:37:39 2002
-l ($/,$b,$c)=@ARGV;for$i(0..$c){/.{$i}(.)/;$_.=$/x($1||$/);($/,$b)=($b,$/)}print/(.{$c})/
90.25 Michiel van Leeuwen Wed May 1 18:43:07 2002
 @q=@ARGV;for(0..500){$a=$q[$_%2];push(@p,($a)x($p[$_]||$a));}
print @p[(0..$q[2]-1)],"
";
90.27 Michael Robinson Wed May 1 12:26:13 2002
-l ($b,$a,$c)=@ARGV;push@a,($a)x(($a,$b)=($b,$a),$a[$i++]||$a)while $c>@a;print@a[0..$c-1]
90.28 Alistair McGlinchy Wed May 1 20:20:13 2002
-l ($x,$y,$l)=@ARGV;push@l,($x)x($l[$c++]||$x)and($x,$y)=($y,$x)for 1..$l;print@l[0..$l-1]
90.28 Peter Makholm Thu May 2 11:01:52 2002
-l ($x,$y,$a)=@ARGV;@f=($x)x$x;push@f,(--$|?$y:$x)x($f[$_]||$y)for(1..$a);print@f[0..$a-1]
90.31 Eirik Berg Hanssen Wed May 1 05:04:22 2002
-l ($x,$y,$z)=@ARGV;push@x,($i%2?$y:$x)x($x[$i++]or $i%2?$x:$y)while@x<$z;print@x[0..$z-1]
91.12 Jerome Quelin Wed May 1 14:11:52 2002
-l ($;,$",$=)=@ARGV;map{$$[@$]=$;for 1..$$[$i++]||$;;($;,$")=($",$;)}1..$=;print@$[0..$=-1]
I should care about shaving strokes instead of playing with tiebreakers
91.14 Jerome Quelin Wed May 1 14:08:33 2002
-l ($;,$")=@ARGV;map{$$[@$]=$;for 1..$$[$i++]||$;;($;,$")=($",$;)}1..500;print@$[0..-1+pop]
this tiebreaker rule leads to really obfuscated code! :)
91.16 Ala Qumsieh Wed May 1 22:10:05 2002
-l $*=pop;@_=@ARGV;{$_.=$_[$|]x(/.{$i}(.)/?$1:$_[$|]);$i++;$|--;s/(.{$*}).*/$1/||redo}print
91.18 Andrew Savige Mon May 6 12:44:19 2002
-l $==pop;push@],($_)x($-++?$-<3?$%>1?$%:$_:$][$--1]:($%=$_))for(@ARGV)x$=;print@][0..$=-1]
91.21 Jerome Quelin Wed May 1 14:04:51 2002
-l ($;,$y)=@ARGV;map{$w[@w]=$;for 1..$w[$i++]||$;;($;,$y)=($y,$;)}1..500;print@w[0..-1+pop]
91.23 Philippe 'BooK' Bruhat Wed May 1 17:09:31 2002
@a=@ARGV;$z.=($a[$|--])x(substr($z,$i++,1)||$a[$j++])for 1..250;print substr($z,0,$a[2]),$/
First working try...
91.24 Alain "TopMach" Dupuis Wed May 1 20:58:01 2002
-l ($a,$b,$c)=@ARGV;for$i(0..$c){/.{$i}(.)/;$_.=$a x($1||$a);($a,$b)=($b,$a)}print/(.{$c})/
91.28 David Newcum Fri May 3 03:01:03 2002
-l @A=@ARGV;map{$s.=$A[$w]x(substr($s,$_,1)||$A[$w]);$w=!$w}0..$A[2];print substr$s,0,$A[2]
91.28 Step McGorm Sun May 5 21:04:12 2002
@a=@ARGV;for(@b=@a;@b<500;$i++){$_=1x$b[$i];s/./$b[$j++]=$a[$i&1]/ge}print@b[0..$a[2]-1],$/
91.30 Daryl Olson Mon May 6 04:24:03 2002
-l @a=@ARGV;$_=$a[0].$a[1];s/./$a[my$f++%2]x$&/eg while$a[2]+1>y///c;print substr$_,0,$a[2]
92.22 Jean-Pierre Vidal Sun May 5 16:39:00 2002
-l sub x{$,.=$ARGV[$i];$l--}$l=pop;while($l){x;$l&&x for 2..substr($,,$n++,1);$i=!$i}print$,
92.22 Jerome Quelin Wed May 1 14:00:21 2002
-l ($;,$y,$z)=@ARGV;map{$w[@w]=$;for 1..$w[$i++]||$;;($;,$y)=($y,$;)}1..500;print@w[0..$z-1]
92.22 Scott Hall Mon May 6 17:18:07 2002
-l ($/,$b)=@ARGV;for(0..999){$;=$_%2?$b:$/;$k.=$;x(substr($k,$_,1)||$;)}print substr$k,0,pop
92.27 Damien Neil Tue May 7 16:54:44 2002
-l $l=pop;@a=@ARGV;$_=$a[0]x$a[0].pop;do{$x=1}until s/./($a[$x^=1])x$&/ge&&/.{$l}/;
print$&;
92.27 Damien Neil Tue May 7 18:23:12 2002
-l $l=pop;@a=@ARGV;$_=$a[0]x$a[0].pop;do{$x=1}until s/./($a[$x^=1])x$&/ge&&/.{$l}/;
print$&;
92.27 Mike Cramer Tue May 7 17:41:32 2002
-l $l=pop;@s=@ARGV;while(@l<$l){@l=(@l,($s[$c%2])x($l[$c]||$s[$c%2]));$c++}print@l[
0..--$l]
92.28 Peter Haworth Wed May 1 12:21:55 2002
-l (@n[0,1],$l)=@ARGV;$0=$n[$_%2],$x.=$0x(substr($x,$_,1)||$0)for 0..$l;print substr$x,0,$l;
92.28 Geoff Richards Sat May 4 12:51:00 2002
-l @x=@ARGV;$i=shift;$z.=$x[$_%2]x$i,$i=substr$z.$x[1],$_+1,1for 0..567;print
substr$z,0,pop
93.12 mathieu longtin Wed May 1 16:09:15 2002
-l ($/,$;,$.)=@ARGV;$*.=$/x(substr($*,$_,1)||$/),($/,$;)=($;,$/)for 0..$.;print substr$*,0,$.
93.24 Kevin Cline Sat May 4 05:02:55 2002
($a,$b,$n)=@ARGV;$b^=$k=$a;$k||($a^=$b,$k=$R[++$p]||$a),(push@R,$a),$k--while$n--;print@R,'
'
93.25 André Savigne Tue May 7 07:32:06 2002
-l print+map{$c--||($v=$ARGV[$|--],$c=$_<1?$v:$_-1?$s[$_-$d]:$v,$d+=--$c);$s[$_]=$v}0..-1+pop
93.26 Michael Robinson Wed May 1 05:27:14 2002
-l ($a,$b,$c)=@ARGV;while($#a<$c){push@a,($a)x($a[$i++]||$a);($a,$b)=($b,$a)}print@a[0..$c-1]
93.26 Guillermo Sansovic Sat May 4 15:15:01 2002
-l $n=pop;($c)=@A=@ARGV;while($r<$n){$_.=$A[$r++%2]x$c;$c=substr$_.$A[1],$r,1}/.{$n}/;print$&
93.30 Josef Drexler Wed May 1 04:07:40 2002
-l ($a,$b,$n)=@ARGV;@c=($a)x$a;push@c,(($a,$b)[$c^=1])x(@c,$b)[$_]for 1..$n;print@c[0..$n-1];
93.31 Colin Meyer Tue May 7 23:03:10 2002
($a,$b,$l)=@ARGV;push@a,($_%2?$b:$a)x($_<2?$a<2*$_?$b:$a:$a[$_])for
0..$l;print@a[0..$l-1],$/
94.15 Ala Qumsieh Wed May 1 21:46:05 2002
-l $*=pop;@_=@ARGV;{$_.=$_[$|]x(/(?<=.{$i})./?$&:$_[$|]);$i++;$|--;s/(.{$*}).*/$1/||redo}print
94.23 Joost Diepenmaat Wed May 1 12:20:49 2002
-l ($n,$d)=@ARGV;$l='.'x pop;$_.=$n x(/$c(.)/?$1:$n),$c.='.',($d,$n)=($n,$d)until/$l/;print$&;
first shot
94.25 Ryan Zachry Tue May 7 20:14:16 2002
($a,$b,$c)=@ARGV;for$i(0..$c){pos=$i;/./g;$_.=($i%2?$b:$a)x($_==1?$b:$&||$a)}print/(.{$c})/,$/
94.26 Jean-Pierre Vidal Sat May 4 10:53:25 2002
sub x{push@t,$d=$ARGV[$i];$l--;print$d}$l=pop;while($l){x;$l&&x for 2..shift@t;$i=!$i}print'
'
94.27 Samy Kamkar Wed May 1 07:02:29 2002
-l ($a,$b,$c)=@ARGV;while(@_<$c){map{push+_,$a}1..$_[$l++]||$a;$a^=$b^=$a^=$b}print@_[0..$c-1]
94.28 Step McGorm Sat May 4 20:55:07 2002
@a=@ARGV;for(@b=@a;@b<500;$k=1-$k){$_=1x$b[$i++];s/./$b[$j++]=$a[$k]/ge}print@b[0..$a[2]-1],$/
95.16 Matthew Byng-Maddick Wed May 1 11:55:17 2002
-l @;=@ARGV;$_.=$;[$|]x(substr($_,$"++,1)||$;[$|]),$|--while y|||c<500;s/(.{$;[2]}).*/$1/;print
a bit more respectable of a solution, though still not good enough.
95.23 z0ned Wed May 1 21:22:48 2002
-l @d=@ARGV;$==pop@d;while($=--){$b[$n++]=$d[$c%2];if(($i++)==$b[$m]-1){$i=0;$m++;$c++}}print@b
95.23 Jerome Quelin Wed May 1 13:36:05 2002
-l ($;,$y,$z)=@ARGV;for$a(1..500){push@w,$;for 1..$w[$i++]||$;;($;,$y)=($y,$;)}print@w[0..$z-1]
95.25 Jean-Pierre Vidal Fri May 3 15:26:17 2002
sub x{push@t,$d=$ARGV[$i];$l--;print$d}$l=pop;while($l){&x;$l&&x for 2..shift@t;$i=!$i}print'
'
95.25 Zephyr McLaughlin Tue May 7 22:44:01 2002
b:if(@b==$ARGV[2]){print@b,"
";exit}push @b,$ARGV[$i%2];$k++;$k<$b[$i]&&goto b;$k=0;$i++;goto b
95.25 Josh Schulz Sun May 5 21:12:48 2002
($a,$b,$c)=@ARGV;for(0..$c){$s.=($_%2?$b:$a)x(substr($s,$_,1)||shift)}print substr($s,0,$c)."
"
95.27 Steve Rushe Wed May 1 10:33:16 2002
-l ($a,$b,$c)=@ARGV;while(@d<$c){push@d,$a for 1..$d[$v++]||$a;($a,$b)=($b,$a)}print@d[0..$c-1]
96.14 pom Sat May 4 13:27:57 2002
-l ($,,$;,$")=@ARGV;$_=$,x$,;$_.=(/$,$/?$;:$,)x(substr($_,++$i,1)||$;)while$i<$";/.{$"}/;print$&
96.20 Tom Hargreaves Wed May 1 16:27:55 2002
-l ($a,$b,$c)=@ARGV;for(;;){for(1..$/[$/++]||$a){(print@/),exit if$c==push@/,$a}($b,$a)=($a,$b)}
96.28 Step McGorm Sat May 4 20:49:28 2002
@a=@ARGV;@b=@a;while(@b<500){$_=1x$b[$i++];s/./$b[$j++]=$a[$k]/ge;$k=1-$k}print@b[0..$a[2]-1],$/
98.17 mathieu longtin Wed May 1 04:13:08 2002
($/,$;,$l)=@ARGV;$z.=$/x(substr($z,$i++,1)||$/),($/,$;)=($;,$/)for 1..$l;print substr($z,0,$l)."
"
98.24 Yoav Goldberg Fri May 3 17:44:06 2002
-l ($a,$b,$c)=@ARGV;$_=$a x$a;$i=1;until(/.{$c}/&&print$&){/.{$i}(.)/;$_.=($i++%2?$b:$a)x($1||$b)}
98.25 Zephyr McLaughlin Tue May 7 22:26:45 2002
b:if(@b==$ARGV[2]){print@b,"
";exit}push @b,$ARGV[$i%2];$k++;if($k<$b[$i]){goto b}$k=0;$i++;goto b
98.26 Michael Robinson Wed May 1 09:10:16 2002
-l ($a,$b,$c)=@ARGV;while($#a<$c){push@a,$a for 1..($a[$i++]||$a);($a,$b)=($b,$a)}print@a[0..$c-1]
98.27 David Newcum Fri May 3 02:39:57 2002
-l @_=@ARGV;foreach$i(0..$_[2]){$_.=$_[$w]x(substr($_,$i,1)||$_[$w]);$w=!$w}print substr$_,0,$_[2]
98.28 seano Fri May 3 02:32:17 2002
@_=@ARGV;@y=@_[0];$t.=($x=shift@y),push@y,($_[($_-1)%2])x($x-1),($_[$_%2])for(1..pop);print"$t\n";
first, boring attempt
99.26 Philippe 'BooK' Bruhat Mon May 6 05:58:58 2002
-l $c=pop;@a=($ARGV[0])x$ARGV[0];push@a,($ARGV[--$|])x($a[$_]||$ARGV[1])for 1..500;print@a[0..$c-1]
100.14 Rafael Garcia-Suarez Thu May 2 20:26:22 2002
-l ($:,$;,$%)=@ARGV;$_=$:x$:;$_.=$;
x(substr$_,++$x,1or$;),($:,$;)=($;,$:)while$%>$x;/.{$%}/;print$&
100.26 Jan Löfvendahl Fri May 3 11:30:40 2002
-l @a=@ARGV;@b="";for$i(1..$a[2]){for$j(1..($b[$i]||$a[$t])){push(@b,$a[$t])}$t=!$t;$_.=$b[$i]}print
100.29 Geoff Richards Thu May 2 21:47:22 2002
-l @x=@ARGV;$i=shift;for(0..500){$z.=$x[$_%2]x$i;$i=substr"$z$x[$_+1%2]",$_+1,1}print substr$z,0,pop
101.23 Michael Thelen Tue May 7 15:13:52 2002
-l @c=($a,$b,$M)=@ARGV;{$x=$c[$x==$a];$_.=$x x(substr($_,$i++,1)||$x);$M>length&&redo}/.{$M}/,print$&
Third try.
101.26 Jean-Pierre Vidal Fri May 3 11:14:35 2002
sub x{push@t,$d=$a[$i];$l--;print$d}$l=pop;@a=@ARGV;while($l){&x;$l&&x for 2..shift@t;$i=!$i}print'
'
101.29 James Harvey Fri May 3 16:49:16 2002
-l ($a,$b,$l)=@ARGV;$b+=$a;for(1..$l){$p=$a-1;$s.=@n?($p=pop@n):$a;@n=(($a)x$p,@n);$a=$b-$a;}print$s;
102.18 Ronald J Kimball Wed May 1 05:56:59 2002
-l ($~,$^,$l)=@ARGV;$_=$~x$~.$^x($~<2?$^:$~);$p=2;$_.=$ARGV[$|--]x substr$_,$p++,1until/.{$l}/;print$&
102.24 Mickut Fri May 3 15:47:17 2002
for(($s,$b,$t)=@ARGV;$u<$t;$u++){$_.=$s x(substr($_,$u,1)||$s);($s,$b)=($b,$s)}s/(.{$t}).*/$1\n/;print
This was finished after 4 hours of picking up perl for the first time (for the cantor-problem).
103.25 Scott Hall Mon May 6 16:07:21 2002
-l $/=shift;$b=shift;$k=$/x$/;for(1..999){$k.=($_%2?$b:$/)x(substr($k,$_,1)or$b)}print substr($k,0,pop)
103.26 Philippe 'BooK' Bruhat Mon May 6 05:58:14 2002
-l @a=(($ARGV[0])x$ARGV[0],$ARGV[1]);splice@a,@a-1,0,($ARGV[--$|])x$a[$_]for 1..500;print@a[0..(pop)-1]
trying another approach (fixed)
103.27 Guillermo Sansovic Fri May 3 00:32:11 2002
-l @A=@ARGV;$r=$A[0]<2;$_=$r.$A[$r]x$A[$r];/.{$r}(.)/,$_.=$A[$r%2]x$1while++$r<$A[2];/.{$A[2]}/;print$&
103.28 James Harvey Thu May 2 17:15:00 2002
($a,$b,$l)=@ARGV;$b+=$a;for(1..$l){$p=$a-1;print!@n?$a:($p=shift@n);push@n,($a)x$p;$a=$b-$a;}print"\n";
Swapping variables, argh.
103.30 Greg Allen Wed May 1 11:22:40 2002
-l ($x,$y,$c)=@ARGV;for(0..$c){push@a,($x)x($a[$_*2]||$x);push@a,($y)x($a[$_*2+1]||$y)}print@a[0..$c-1]
First working attempt
104.25 Peter Haworth Wed May 1 10:39:26 2002
-l ($n,$m,$l)=@ARGV;for(;$l>length;($n,$m)=($m,$n)){$_.=$n x(substr($_,$p++,1)||$n)}print substr$_,0,$l;
104.25 z0ned Wed May 1 08:20:20 2002
@d=@ARGV;$m=($l=pop@d)-1;while($l--){print($b[$l]=$d[$c%2]);if(($i++)==$b[$m]-1){$i=0;$m--;$c++}}print$/
104.25 Scott Hall Mon May 6 16:04:38 2002
-l $/=shift;$b=shift;$k=$/x$/;for(1..999){$k.=($_%2?$b:$/)x(substr($k,$_,1)or$b)}print substr($k,0,pop);
104.26 Ken Rockot Thu May 2 05:42:23 2002
-l $n=pop;$x=pop^($c=pop);while($n){$n-=$l=($o=$a[$i++]||$c)>$n?$n:$o;push@a,$c while$l--;$c^=$x}print@a
105.24 Tony Young Thu May 2 02:26:35 2002
$c=pop;@v=@ARGV;$|=1;do{push@a,split//,$v[--$|]x($i<@a?$a[$i++]:$v[$i++])}until@a>$c;print@a[0..$c-1],"
"
105.24 tinita Wed May 1 10:40:09 2002
-l ($x,$y,$z)=@ARGV;$s=$b=$x;$_.=$b
x$s,$b^=$x^$y,$s=(split//)[++$c]||$b
while$z>split//;m/.{$z}/,print$&
105.24 z0ned Wed May 1 07:48:06 2002
@d=@ARGV;$m=($l=pop@d)-1;while($l--){print($b[$l]=$d[$c%2]);if(($i++)==$b[$m]-1){$i=0;$m--;$c++;}}print$/
105.26 Ryan Zachry Fri May 3 14:52:17 2002
-l ($a,$b,$c)=@ARGV;for$i(0..$c){$n=$i%2?$b:$a;/.{$i}(.)/;$t=$_==1?$b:!$i?$n:$+;$_.=$n x$t}print/(.{$c})/
105.29 Gregory Vincic Sat May 4 17:52:13 2002
-l ($n,$s,$i)=@ARGV;$l=0;map{push@r,(@ARGV[$l])x$n;$l=$l?0:1;$n=@r[$_]?@r[$_]:$s;}1..500;print@r[0..--$i]
106.14 Ross Younger Fri May 3 22:55:04 2002
-l ($.,$/,$")=@ARGV;split'',$.x$..$/;for(0..$"){$_[$%++]=$-?$/:$.for(1..$_[$?++]);$-=1-$-}$#_=$"-1;print@_
106.25 Honza Pazdziora Thu May 2 11:28:20 2002
-l $l=pop;($x,$y)=@ARGV;while(length$_<$l){$q=($|--?$y:$x);$_.=$q x substr$_.$q,$o++,1}print substr$_,0,$l
106.25 Jean-Pierre Vidal Fri May 3 09:39:58 2002
sub x{push@t,$d;$l--;print$d}$l=pop;@a=@ARGV;while($l){push@a,$d=shift@a;&x;$l&&&x for 2..shift@t}print'
'
106.26 Benoît Chauvet Wed May 1 08:11:16 2002
-l ($a,$b,$e)=@ARGV;for$g(1..$e){/$r(.)?/;$r=$&;$_.=($l=$a)x(!$1?$r=$a:$1);$a=$b;$b=$l}print substr$_,0,$e
106.26 Jerome Quelin Wed May 1 13:16:01 2002
-l ($x,$y,$z)=@ARGV;$_=$x x$x;for$a(1..500){($x,$y)=($y,$x);$_.=$x x(substr($_,++$i,1)||$x)}print/(.{$z})/
106.26 Joe Baldassini Tue May 7 18:50:46 2002
-l @k=@ARGV;for(0..pop){splice(@k,$o,$k[$i],($x=shift)x$k[$i]),$o+=$k[$i++],push@ARGV,$x}print @k[0..$i-2]
106.28 Scott Hall Mon May 6 15:41:17 2002
-l $a=shift;$b=shift;$k=$a x$a;for(1..999){$k.=($_%2?$b:$a)x(substr($k,$_,1)or$b)};print substr($k,0,pop);
106.29 Bjørn Hee Sun May 5 18:48:28 2002
-l ($a,$b,$c)=@ARGV;for$d(0..$c){push@e,$a;$f=$e[$d];for(2..$f){push@e,$a}($a,$b)=($b,$a)}print@e[0..$c-1]
107.24 Kevin Cline Sat May 4 04:17:54 2002
($a,$b,$n)=@ARGV;$k=$a;$b^=$a;while($n--){if(!$k){$a^=$b;$k=$B[++$p]||$a;}push@B,$a;$k--;}$"='';print"@B\n"
107.28 Thorbjørn Ravn Andersen Mon May 6 06:05:30 2002
-l  ($a)=@a=@ARGV;@s=($a,$a[$a-1?0:1]);map{$e.=$d=$s[$x];map{$s[$j++]=$a[$x%2]}1..$d;$x++}1..$a[-1];print$e
107.30 Olivier Blanchard Sun May 5 16:29:04 2002
-l ($a,$b,$c)=@ARGV;$o=$a x$a.$b x($a>1?$a:$b);$o.=$ARGV[$_%2]x substr$o,$_,1 for 2..$c;print substr$o,0,$c
108.17 BigrTex Tue May 7 21:55:57 2002
-l ($%,$/)=@ARGV;$@=$%x$%.$/x($%==1?$/:$%);map{$@.=($_%2?$/:$%)x substr $@,$_,1}2..500;print substr $@,0,pop
Pulled more redundant code out from my first ?: construct
108.19 Rick Myers Sun May 5 13:31:16 2002
@a=@ARGV;while($a[2]--){if($_){s/.//;print$&;$_.=$a[$|--]x$&}else{$_=$a[$|]x$a[$|--];s/.//;print$&}}print"
"
108.26 Jerome Quelin Wed May 1 09:19:27 2002
-l ($x,$y,$z)=@ARGV;$_=$x x$x;for$a(1..500){$w=($w==$y)?$x:$y;$_.=$w x(substr($_,++$i,1)||$y)}print/(.{$z})/
108.27 Lucca Wed May 1 09:49:55 2002
-l ($b,$a,$d)=@ARGV;do{push@l,split//,$b x($l[$c++]?$l[$c-1]:$b);($a,$b)=($b,$a)}while@l<$d;print@l[0..$d-1]
108.27 mpiwg Tue May 7 18:21:14 2002
@t=shift;$b=shift;for(1..pop){for(1..$t[$n]){@t[$i++]=$n%2?$b:$t[0]}$t[1]=$t[1]||$b;$f.=$t[$n++]}print"$f\n"
108.29 Peter Makholm Wed May 1 09:43:59 2002
-l ($x,$y,$a)=@ARGV;@f=($x)x$x;push@f,($y)x($#f?$x:$y);push@f,($|--?$y:$x)x$f[$_]for(2..$a);print@f[0..$a-1]
109.25 Sami J. Mäkinen Fri May 3 10:00:36 2002
@t=@ARGV;$l=pop@t;$"='';for($s="@t";$n<999;$i=0){$s=~s/(.)/$t[++$n,$i++%2]x$1/ge;}print substr($s,0,$l),"\n";
Sigh.
109.29 Scott Hall Mon May 6 15:18:34 2002
-l $c=pop;$b=pop;$a=pop;$k=$a x$a;for(1..500){$k .=($_%2?$b:$a)x(substr($k,$_,1)or$b)};print substr($k,0,$c);
110.10 Simon Whitaker Wed May 1 23:06:34 2002
-l ($.,$/,$,)=@ARGV;$_=($;=$.)x$.;while((length)<$,){$;=$:++%2?$.:$/;/.{$:}(.)/;$_.=$;x($+||$;)}print/(.{$,})/
110.12 Will Coleda Tue May 7 18:34:40 2002
for(@*=@ARGV;@/<$*[2];){@/<2?push@/,($*[$/])x$*[$/++]:push@/,($*[$*%2])x$/[$/++];$*++;}print@/[0..$*[2]-1],"
"
110.25 z0ned Wed May 1 07:20:03 2002
@d=@ARGV;$m=($l=$d[2])-1;while($l--){print($b[$l]=$d[$c]);if(($i++)==$b[$m]-1){$i=0;$m--;$c=($c?0:1);}}print$/
110.28 Peter Makholm Wed May 1 09:33:56 2002
($x,$y,$a)=@ARGV;@f=($x)x$x;push@f,($y)x($#f?$x:$y);push @f,($|--?$y:$x)x$f[$_]for(2..$a);print@f[0..$a-1],"
"
111.17 BigrTex Tue May 7 21:54:22 2002
-l ($%,$/)=@ARGV;$@=$%x$%.($%==1?$/x$/:$/x$%);map{$@.=($_%2?$/:$%)x substr $@,$_,1}2..500;print substr $@,0,pop
Moving up two more spots by chopping off a stroke by reconfiguring my whole first ?: initialize the string contraption.
112.17 BigrTex Tue May 7 21:39:11 2002
-l ($%,$/)=@ARGV;$@=$%==1?$%.$/x$/:$%x$%.$/x$%;map{$@.=($_%2?$/:$%)x substr $@,$_,1}2..500;print substr $@,0,pop
Stripping parens off my two substr commands saves me two more strokes. I pass one other beginner, and am within a stroke of two more, time to look at Cantor again...
112.25 Zephyr McLaughlin Tue May 7 21:11:18 2002
@a=@ARGV;while($i<500){push@b,$a[$i%2];$k=$b[$i]-1;while($k--){push@b,$a[$i%2]}$i++}print splice(@b,0,$a[2]),"
"
112.28 Ronald J Kimball Wed May 1 05:37:19 2002
-l ($a,$b,$l)=@ARGV;@a=(($a)x$a,($b)x($a<2?$b:$a));$p=2;push@a,($ARGV[$|--])x$a[$p++]while@a<$l;print@a[0..$l-1]
113.24 Kevin Cline Sat May 4 02:36:00 2002
@A=@ARGV;$k=$A[0];$p=1;while($A[2]--){if(!$k){$i ^=1;$k=$B[$p++]||$A[$i];}push @B,$A[$i];$k--;}$"='';print "@B\n"
113.31 Olivier Blanchard Sun May 5 11:44:30 2002
-l ($a,$b,$c)=@ARGV;$o=$a>1?$a x$a:$a.$b x$b;$o.=$ARGV[$_%2]x substr$o,$_,1 for($a>1?1:2)..$c;print substr$o,0,$c
114.17 BigrTex Tue May 7 21:36:54 2002
-l ($%,$/)=@ARGV;$@=$%==1?$%.$/x$/:$%x$%.$/x$%;map{$@.=($_%2?$/:$%)x substr($@,$_,1)}2..500;print substr($@,0,pop)
removing parens one place worked, let's try another... yea, 2 more strokes!
114.25 z0ned Wed May 1 06:41:29 2002
($j,$k,$l)=@ARGV;$m=$l-1;while($l--){print($b[$l]=($c?$k:$j));if(($i++)==$b[$m]-1){$i=0;$m--;$c=($c?0:1);}}print$/
114.26 Jean-Pierre Vidal Thu May 2 16:00:11 2002
-l sub x{push@t,$d;$l--;$s.=$d}($a,$b,$l)=@ARGV;$d=$a;while($l){&x;$l&&&x for 2..shift@t;$d=($d==$a)?$b:$a}print$s
114.26 Sami J. Mäkinen Fri May 3 09:43:03 2002
@t=@ARGV;$l=pop@t;$"='';for($s="@t";length($s)<$l+1;$i=0){$s=~s/(\d)/$t[$i++%2]x$1/ge;}print substr($s,0,$l),"\n";
Sigh.
114.26 Mike Schilli Sun May 5 05:49:28 2002
-l (@n[0,1],$c)=@ARGV;while($c>0){$c-=$l=(substr($o,$j,1)||$n[$i]);$o.=$n[$i]x$l;$i=!$i;$j++;}print substr$o,0,pop
116.17 BigrTex Tue May 7 21:35:25 2002
-l ($%,$/)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;map{$@.=($_%2?$/:$%)x substr($@,$_,1)}2..500;print substr($@,0,pop)
I had my second ?: in parens with the conditional also in parens (not needed) -- saves 2 strokes. I'm on a roll and running out of time
116.25 Sami J. Mäkinen Fri May 3 08:23:04 2002
@t=@ARGV;$l=pop@t;$"='';$s="@t";while(length($s)<$l+9){$i=0;$s=~s/(\d)/$t[$i++%2]x$1/ge;}print substr($s,0,$l),"\n";
Try regex instead of lists.
116.26 David Lowe Wed May 1 05:30:11 2002
($a,$b,$c)=@ARGV;++$i;$_=$a x$a.$b x($a<2?$b:$a);$_.=($|--?$b:$a)x
substr$_,++$i,1while y///c<$c;printf"%.*s
",$c,$_
116.27 Lucca Wed May 1 09:38:09 2002
-l sub a{push@l,split//,$b x($l[$c++]?$l[$c-1]:$b);($a,$b)=($b,$a)}($b,$a,$d)=@ARGV;a;a while@l<$d;print@l[0..$d-1];
117.12 Will Coleda Tue May 7 17:49:29 2002
for(@*=@ARGV;@/<2;$*++){push@/,($*[$/])x$*[$/++]}while(@/<$*[2]){push@/,($*[$*++%2])x$/[$/++]}print@/[0..$*[2]-1],"
"
117.26 Will Coleda Tue May 7 17:19:55 2002
for(@a=@ARGV;@o<2;$n++){push@o,($a[$i])x$a[$i++]}while(@o<$a[2]){push@o,($a[$n++%2])x$o[$i++]}print@o[0..$a[2]-1],"
"
118.17 BigrTex Tue May 7 21:33:40 2002
-l ($%,$/)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;map{$@.=(($_%2)?$/:$%)x substr($@,$_,1)}2..500;print substr($@,0,pop)
Using the pop trick to pull off the length for the print substr call ultimately saves me a stroke, but costs me tiebreaker hardcoding that '500'
118.24 wickline Mon May 6 16:17:14 2002
-l @z=((@0=@ARGV)[0])x$0[0];$#z or@z=(1,($0[--$|])x$0[++$"]);@z=(@z,($0[--$|])x$z[++$"])for 0..666;print@z[0..--$0[2]]
118.24 wickline Mon May 6 18:27:20 2002
-l @z=(@0=@ARGV)[0]==1?(1,($0[--$|])x$0[++$"]):($0[0])x$0[0];@z=(@z,($0[--$|])x$z[++$"])for 0..666;print@z[0..--$0[2]]
118.27 Guillermo Sansovic Thu May 2 23:35:56 2002
-l $n=pop;@A=@ARGV;@A=(pop,1),$r=1if$A[0]==1;$_=$r.$A[0]x$A[0];/.{$r}(.)/,$_.=$A[$t^=1]x$1while++$r<$n;/.{$n}/;print$&
119.15 BigrTex Tue May 7 21:26:11 2002
-l ($%,$/,$~)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;map{$@.=(($_%2)?$/:$%)x substr($@,$_,1)}2..$~;print substr($@,0,$~)
The -l flag means I don't have to put a newline in my print, saving me a stroke.
120.14 BigrTex Tue May 7 21:11:06 2002
($%,$/,$~)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;map{$@.=(($_%2)?$/:$%)x substr($@,$_,1)}2..$~;print substr($@,0,$~)."
"
I replaced my swap with a ?: construct, shaving strokes, but not moving me up the leaderboard. Replacing for with map has also soured my tiebreaker because I'm using $_ :(
120.24 wickline Fri May 3 17:49:24 2002
-l @z=((@0=@ARGV)[0])x$0[0];$#z or@z=(1,($0[--$|])x$0[++$"]);@z=(@z,($0[--$|])x$z[++$"])for 0..666;print @z[0..--$0[2]];
(hope the wrap doesn't count against me :)
120.26 Will Coleda Tue May 7 14:33:44 2002
for(@a=@ARGV;@o<2;$n++){push @o,($a[$i])x$a[$i++]}while(@o<$a[2]){push @o,($a[$n++%2])x$o[$i++]}print @o[0..$a[2]-1],"
"
121.27 Daniel Cutter Sun May 5 16:43:42 2002
($a,$b,$c)=@ARGV;do{$r=substr$k,$i++,1;$r=$a if!$r;$k.=$a x$r;($a,$b)=($b,$a)}until$c<length$k;print substr($k,0,$c)."\n"
I'm happy to have solved the problem, let alone solve it short.
122.17 Matthew Byng-Maddick Wed May 1 10:41:44 2002
-l @;=@ARGV;$"++,$_.=$;[$|]x$;[$|--]while y|||c<2;$_.=$;[$|--]x substr($_,$"++,1)while y|||c<500;substr($_,$;[2])=$,;print
this is way too long for this. I ought to be able to reduce it a fair bit
122.26 Will Coleda Tue May 7 14:22:18 2002
for(@a=@ARGV;@o<2;$n++){push @o,($a[$i])x$a[$i++]}while(@o<$a[2]){push @o,($a[1-++$n%2])x$o[$i++]}print @o[0..$a[2]-1],"
"
122.31 Olivier Blanchard Fri May 3 16:11:55 2002
($a,$b,$c)=@a=@ARGV;$o=$a>1?$a x$a:$a.$b x$b;$j=$a>1?1:2;$o.=$a[$_%2]x substr($o,$_,1)for$j..$c;print substr($o,0,$c),"
";
123.26 z0ned Wed May 1 06:04:57 2002
$l=pop;$k=pop;$j=pop;$m=$l-1;$c=0;while($l--){print($b[$l]=($c?$k:$j));if(($i++)==$b[$m]-1){$i=0;$m--;$c=($c?0:1);}}print$/
125.21 Joe Cullin Tue May 7 04:31:45 2002
-l ($=,$-)=@ARGV,@a=($=)x$=;$=<2&&($y=1)&&push@a,($-)x$-;map{push@a,($_%2?$-:$=)x$a[$_]}1+$y..999;$"=!splice@a,pop;print"@a";
126.29 Pepik Tue May 7 20:42:55 2002
-l ($A,$B,$C)=@ARGV;$x=$A x$A;if($A<2){$x.=$B x$B;$i++}for($i+1..$C){$c=$ARGV[$_%2];$x.=$c x substr$x,$_,1}print substr$x,0,$C
127.11 BigrTex Tue May 7 20:50:06 2002
($%,$/,$~)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;map{$!=$/;$/=$%;$%=$!;$@.=$/x 
substr($@,$_,1)}2..$~;print substr($@,0,$~)."
"
I finally finangled the for into a map. I don't know why 2..$~ works, but it passed so I'm submitting it to move up a couple places on the leaderboard.
127.22 wickline Fri May 3 15:06:10 2002
-l @0=@ARGV;@z=($0[$|--])x$0[$"++];$#z or@z=(1,($0[$|--])x$0[$"++]);@z=(@z,($0[$|--])x$z[$"++])for 0..666;print @z[0..--$0[2]];
hmmm... my code wrapped in the above box... hope that won't add two characters to my score... (the text I pasted was all one line) Assuming this passes muster, I can now say I've participated in my first golf tournament! I doubt I'll have time to hack my score down any, but it's been a blast playing as much as I did. Thanks! :) -matt
127.24 Simon P Fri May 3 12:31:37 2002
-l ($e,$d)=(shift,shift);for($s=pop;$s;$s--){s/(.)//;$m=$1||$e;for$i(1..$m){s/$/$e/}$1?1:s/(.)//;$q.=$1;($e,$d)=($d,$e)}print$q
Going to rethink...
127.26 Will Coleda Tue May 7 14:07:01 2002
@a=@ARGV;while(@o<2){push @o,($a[$i])x$a[$i++];$n++}while(@o<$a[2]){$n++;push @o,($a[1-$n%2])x$o[$i++]}print @o[0..$a[2]-1],"
"
127.29 Pepik Tue May 7 20:16:58 2002
-l ($A,$B,$C)=@ARGV;$x=$A x$A;if($A==1){$x.=$B x$B;$i++}for($i+1..$C){$c=$ARGV[$_%2];$x.=$c x substr$x,$_,1}print substr$x,0,$C
Just keep on deleting things....
127.29 Pepik Tue May 7 20:22:17 2002
-l ($A,$B,$C)=@ARGV;$x=$A x$A;if($A==1){$x.=$B x$B;$i++}for($i+1..$C){$c=$ARGV[$_%2];$x.=$c x substr$x,$_,1}print substr$x,0,$C
Just keep on deleting things....
128.29 Boyd Nation Mon May 6 18:57:19 2002
-l ($a,$b,$l)=@ARGV;@a=(($a)x$a,($b)x($a==1?$b:$a));for(;($j+=2)<$l;){@a=(@a,($a)x$a[$j]);@a=(@a,($b)x$a[$j+1])}print@a[0..$l-1]
129.21 wickline Mon May 6 13:48:59 2002
-l ($/=$_=(@0=@ARGV)[0]).=$_==($"=1)?$0[$"++]x$0[1]:$0[$|--]x--$_;$/.=$0[$|--]x substr$/,$"++,1 for 1..666;print substr$/,0,$0[2]
arrrrgggghhh.... damn this acursed sport... never shoulda started!!!! Why isn't there some sort of Big Bold Warning in the course description to scare away folks who might wish to do something else with their time? ...because apparently that isn't an option once you start! :/ -matt (having more fun w/ this than is reasonable)
129.26 Guillermo Sansovic Thu May 2 01:04:59 2002
-l ($a,$b,$n)=@ARGV;$_=$a x$a;if($a==1){$_=$a.$b x$b;$t=1;$i=1};/.{$i}(.)/,$_.=(($t^=1)?$b:$a)x$1while($i++<$n);/(.{$n})/;print$1
129.27 Jean-Pierre Vidal Thu May 2 07:38:31 2002
-l ($a,$b,$l)=@ARGV;$n=$d=$a;while($l>0){$l-=$n;$s.=$d;$n=substr($s,$i++,1);$s.=$d x--$n;$d=($d==$a)?$b:$a}print substr($s,0,pop)
130.24 Oliver Maul Thu May 2 09:45:04 2002
-l while($l=$ARGV[2]-length($s)){$d=$ARGV[($e++)%2];push@l,split//,"$d"x($l[0]||$d)
;$n=shift@l||$d;$s.="$d"x($n>$l?$l:$n)}print$s
130.27 Subhash Chandra Fri May 3 15:37:02 2002
-l $h=($n=shift)+shift;$l=pop;do{if(@s>1){$j=$s[$i++];}else{$j=$n;++$i;}push@s,($n)x$j;$n=$h-$n;}while(@s<$l);splice@s,$l;print@s;
130.27 Guillermo Sansovic Wed May 1 15:38:58 2002
-l ($a,$b,$n)=@ARGV;$_=$a x$a;if($a==1){$_=$a.$b x$b;$t=1;$i=1};/.{$i}(.)/,$_.=(($t^=1)?$b:$a)x$1while($i++<$n);/(.{$n})/;print$1;
131.24 Sami J. Mäkinen Thu May 2 21:34:34 2002
@x=($a,$b)=@ARGV;while(@x<999){@y=();$c=$a;grep{push@y,($c)x$_;$c=$c==$b?$a:$b;}@x;@x=@y;}$"='';print substr("@x",0,$ARGV[2]),"\n";
Argh.
131.26 Will Coleda Tue May 7 14:04:20 2002
@a=@ARGV;$n=-1;while(@o<2){push @o,($a[$i])x$a[$i++];$n++}while(@o<$a[2]){$n++;push @o,($a[$n%2])x$o[$i++]}print @o[0..$a[2]-1],"
"
131.28 Phil Crow Mon May 6 15:48:39 2002
$l=pop;@A=@ARGV;L:$a.=$A[$j%2]x$A[$j++%2];goto L if($a<2);while($j<$l){$a.=$A[$j%2]x substr($a,$j++,1);}print substr($a,0,$l)."\n";
131.28 Michael Thelen Mon May 6 23:23:54 2002
-l ($a,$b,$M)=@ARGV;$_=$a x$a.$b x($a-1?$a:$b);$x=$a;$i=2;{$_.=$x x substr$_,$i++,1;$x=$x==$a?$b:$a;$M>length&&redo}/.{$M}/,print$&
Second try.
131.29 Pepik Tue May 7 20:15:04 2002
-l ($A,$B,$C)=@ARGV;$x=$A x$A;if($A==1){$x.=$B x$B;$i++}for($i+1..$C){$c=$ARGV[$_%2];$x.=$c x substr($x,$_,1)}print substr($x,0,$C)
132.23 Simon P Fri May 3 12:17:58 2002
-l ($e,$d)=(shift,shift);for($s=shift;$s;$s--){s/(.)//;$m=($1||$e);for$i(1..$m){s/$/$e/};$1?1:s/(.)//;$q.=$1;($e,$d)=($d,$e)}print$q
Got rid of hash.
134.26 Thorbjørn Ravn Andersen Sun May 5 02:06:59 2002
 @a=@ARGV;$c=pop@a;@s=split(//,$a[0]x$a[0].$a[1]); 
map{$d=$s[$_];$e.=$d;foreach$k(1..$d){$s[$j++]=$a[$_%2]}}(0..$c-1);print"$e\n"; 
 


134.28 Ryan Zachry Fri May 3 14:04:45 2002
-l ($a,$b,$c)=@ARGV;for$i(0..$c){$n=($n==$a)?$b:$a;@t=($i==0)?$n:$l=~/./g;$t[$i]=$b if(length$l==1);$l.=$n x$t[$i]}print substr$l,0,$c
finally...
134.28 Pepik Tue May 7 20:07:09 2002
-l ($A,$B,$C)=@ARGV;$x="$A"x$A;if($A==1){$x.="$B"x$B;$i++}for($i+1..$C){$c=$ARGV[$_%2];$x.="$c"x substr($x,$_,1)}print substr($x,0,$C)
135.09 BigrTex Tue May 7 17:10:31 2002
($%,$/,$~)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;for($^++;$^++<$~;){$!=$/;$/=$%;$%=$!;$@.=$/x substr($@,$^,1)}print substr($@,0,$~)."
"
replaced $_ with $~ to lower tie-breaker, and replaced \n with an actual I wish I knew how to get rid of the ugly substr calls. I'm guessing that there must be some known way to predict the nth character of a Kolakoski sequence. Maybe I'll have time for a google search this afternoon. Either way, thanks for the fun.
136.12 BigrTex Thu May 2 00:02:59 2002
($%,$/,$_)=@ARGV;$@=($%==1)?$%.$/x$/:$%x$%.$/x$%;for($^++;$^++<$_;){$!=$/;$/=$%;$%=$!;$@.=$/x substr($@,$^,1)}print substr($@,0,$_)."\n"
5pm and I can't read my own code anymore, but boy I have a low tie-breaker.
136.25 POOP Tue May 7 12:54:50 2002
$c=pop;$b=pop;$a=pop;$_=$a;while($c--){print;@s=((split//,$a
x--$_),@s);($#s==-1)?$_=$b:($_=pop@s,@s=($b,@s));$t=$a;$a=$b;$b=$t}print"
"
137.27 Pepik Thu May 2 22:00:38 2002
-l ($A,$B,$C)=@ARGV;$x="$A"x$A;$i++;if($A==1){$x.="$B"x$B;$i++}for($i..$C){$c=$ARGV[$_%2];$x.="$c"x substr($x,$_,1)}print substr($x,0,$C)
Better...
139.24 Sami J. Mäkinen Thu May 2 21:11:40 2002
$l=pop @ARGV;@x=($a,$b)=@ARGV;while(@x<999){@y=();$c=$a;grep {push@y,($c)x$_;$c=$c==$b?$a:$b;}@x;@x=@y;}$"='';print substr("@x",0,$l),"\n";
Sigh. This is awful. -sjm
140.23 Joe Cullin Mon May 6 15:24:34 2002
-l ($=,$-)=@ARGV,@a=($=)x$=;$=<2&&($y=1)&&push@a,($-)x$-;for$n(1+$y..999){for(1..$a[$n]){push@a,$n%2?$-:$=}}map$j.=$a[$_],0..-1+pop;print$j;
I submitted this last night and saw this morning that it was rejected. I just downloaded the latest test program and it says I passed. I've tried it on 5.6.? on win98 and 5.005_03 on solaris. My only guess is that when I submitted it last night using internet explorer, IE put a line break in the wrong place. Hopefully this will work this time since I'm using unix netscape and it doesn't wrap text as much as IE. If it still fails, can you please let me know why?
140.24 Simon P Fri May 3 10:58:13 2002
-l %h=($e=(shift),shift);$h{$h{$e}}=$e;for($s=shift;$s;$s--){s/(.)//;$m=($1||$e);for$i(1..$m){s/$/$e/};$1?1:s/(.)//;$q.=$1;$e=$h{$e}}print$q
Got rid of sub...
140.29 BigrTex Wed May 1 23:10:42 2002
($a,$b,$l)=@ARGV;$s=($a==1)?$a.$b x$b:$a x$a.$b x$a;for($x++;$x++<$l;){$s.=$a x substr($s,$x,1);$c=$b;$b=$a;$a=$c}print substr($s,0,$l)."\n"
140.30 David Newcum Fri May 3 02:28:47 2002
-l @_=@ARGV;$_=$_[0]x$_[0].$_[1]x($_[0]-1?$_[0]:$_[1]);$i=2;while($i<$_[2]){$_.=$_[$w]x substr($_,$i,1);$i++;$w=!$w}print substr($_,0,$_[2])
141.29 Rick Cook Mon May 6 12:33:03 2002
($A,$R,$G)=@ARGV;$_=$A x$A;if($A<2){$_.=$R x$R;$x++}for(;$x<$G;$x++){$t=$R;$t=$A if$x%2;$_.=$t x substr$_,$x+1,1}print((substr$_,0,$G),"\n");
144.28 giorgos zervas Thu May 2 13:24:28 2002
($a,$b,$g)=@ARGV;@l=split'',($a x$a);k($b,$a,1);print@l[0..$g-1],"
";sub k{($z,$x,$c)=@_;if($#l<$g){for(1..$l[$c]||$z){push@l,$z}k($x,$z,$c+1)}}
146.29 BigrTex Wed May 1 21:29:16 2002
($a,$b,$l)=@ARGV;$s=($a==1)?$a.$b x$b:$a x$a.$b x$a;$x=2;for(;$i<$l;$i++){$s.= $a x substr($s,$x++,1);$c=$b;$b=$a;$a=$c}print substr($s,0,$l)."\n"
Changed while(length... to a for($i<$l...
146.29 David Newcum Fri May 3 02:21:55 2002
-l @_=@ARGV;$_=$_[0]x$_[0].$_[1]x($_[0]-1?$_[0]:$_[1]);$i=2;while(length()<$_[2]){$_.=$_[$w]x substr($_,$i,1);$i++;$w=!$w}print substr($_,0,$_[2])
148.29 David Newcum Fri May 3 02:05:17 2002
-l @_=@ARGV;$_=$_[0]x$_[0].$_[1]x($_[0]-1?$_[0]:$_[1]);$i=2;while(length()<$_[2]){$_.=$_[$w]x substr($_,$i,1);$i++;$w=1-$w;}print substr($_,0,$_[2])
151.25 Will Coleda Tue May 7 13:40:26 2002
@a=@ARGV;$n=-1;while(length($o)<2){$o.=$a[$i]x$a[$i++];$n++}while(length($o)<$a[2]){$n=1-$n;$o.=$a[$n]x substr($o,$i++,1)}print substr($o,0,$a[2]),"
";
151.28 BigrTex Wed May 1 21:22:39 2002
($a,$b,$l)=@ARGV;$s=($a==1)?$a.$b x$b:$a x$a.$b x$a;$x=2;while(length($s)<$l){$s.= $a x substr($s,$x++,1);$c=$b;$b=$a;$a=$c}print substr($s,0,$l)."\n";
replaced the ugly if with a ?: statement
153.28 Jean-Pierre Vidal Wed May 1 15:12:48 2002
-l $l=pop;$b=pop;$d=$a=pop;if($d==1){$d=$b;$s=1;++$i};$n=$d;while($l>length$s){$s.=$d x$n;$d=($d==$a)?$b:$a;++$i;$n=substr($s,$i,1)}print substr($s,0,$l)
154.28 Pepik Thu May 2 21:33:29 2002
-l @a=@ARGV;$x="$a[0]"x$a[0];$i++;if($a[0]==1){$x.="$a[1]"x$a[1];$i++}for($i..pop){$cd=$a[$_%2];$b=substr($x,$_,1);$x.="$cd" x $b}print substr($x,0,pop@a)
Well, at least I'm on the board.
157.25 Will Coleda Tue May 7 13:36:11 2002
@a=@ARGV;$k=$ARGV[2];$n=-1;while(length($o)<2){$o.=$a[$i]x$a[$i++];$n++}while(length($o)<$k){$n=1-$n;$o.=$a[$n]x substr($o,$i++,1)}print substr($o,0,$k),"
";
157.26 Joe Cullin Sat May 4 04:14:54 2002
($o,$t,$l)=@ARGV;for(1..$o){push@a,$o}if($o<2){for(1..$t){push@a,$t}$|=1}for$n(1+$|..999){for(1..$a[$n]){push@a,$n%2?$t:$o}}print$a[$z++]while$z<$l;print'
';
157.26 Joe Cullin Sat May 4 06:57:01 2002
($o,$t,$l)=@ARGV;for(1..$o){push@a,$o}if($o<2){for(1..$t){push@a,$t}$|=1}for$n(1+$|..999){for(1..$a[$n]){push@a,$n%2?$t:$o}}print$a[$z++]while$z<$l;print'
';
159.25 Simon P Fri May 3 10:36:59 2002
-l %h=($e=(shift),shift);$h{$h{$e}}=$e;for($s=shift;$s;$s--){s/(.)//;$m=($1||$e);$_.=&k;$1?1:s/(.)//;$q.=$1;$e=$h{$e}}print$q;sub k{$b="";for(1..$m){$b.=$e}$b}
twaeked a bit more... going to rethink
159.28 Joe Cullin Fri May 3 06:00:41 2002
($o,$t,$l)=@ARGV;for(1..$o){push@a,$o}if($o<2){for(1..$t){push@a,$t}$s=2}for$n($s||1..999){for(1..$a[$n]){push@a,$n%2?$t:$o}}$a[$l]='
';for(0..$l){print$a[$_]}
160.23 Sigmund Tue May 7 20:20:21 2002
$x=$ARGV[0];$y=$ARGV[1];$p=0;while(length($_)<=$ARGV[2]){$_.=$x;m/(.{$p})(\d)/;$_.=$x x($2-1);($x,$y)=($y,$x);$p++}chop while(length($_)>$ARGV[2]);print$_."\n";
161.28 BigrTex Wed May 1 21:09:55 2002
($a,$b,$l)=@ARGV;if($a==1){$s=$a.$b x$b}else{$s=$a x$a.$b x$a}$x=2;while(length($s)<$l){$s.= $a x substr($s,$x++,1);$c=$b;$b=$a;$a=$c}print substr($s,0,$l)."\n";
Swapping $a and $b in my while...
162.24 Sigmund Mon May 6 10:16:06 2002
$x=$ARGV[0];$y=$ARGV[1];$p=0;while(length($_)<=$ARGV[2]){$_.=$x;m/(.{$p})(\d)/;$_.=$x x($2-1);$z=$x;$x=$y;$y=$z;$p++}chop while(length($_)>$ARGV[2]);print$_."\n";
165.24 Simon P Fri May 3 10:12:36 2002
-l %h=($e=(shift),shift);$h{$h{$e}}=$e;for($s=shift;$s;$s--){s/(.)//;$m=($1||$e);$_.=&k;($1)?1:s/(.)//;$q.=$1;$e=$h{$e}}print$q;sub k{$b="";while($m){$b.=$e;$m--}$b}
Getting Better.
170.27 BigrTex Wed May 1 19:44:15 2002
($a,$b,$l)=@ARGV;$s=$a x$a;$x=1;if($a==1){$s.=$b x$b.$a x$b;$x+=2}while(length($s)<$l){$s.= $b x substr($s,$x++,1);$s.= $a x substr($s,$x++,1)}print substr($s,0,$l)."\n";
I finally figured out the question, now at least I'm on the board.
171.27 BigrTex Wed May 1 21:07:57 2002
($a,$b,$l)=@ARGV;if($a==1){$s=$a.$b x$b}else{$s=$a x$a.$b x$a}$x=2;while(length($s)<$l){$s.= $a x substr($s,$x++,1);$s.= $b x substr($s,$x++,1)}print substr($s,0,$l)."\n";
A different tactic at initializing $s.
172.28 Michael Thelen Mon May 6 21:03:14 2002
($a,$b,$c)=@ARGV;$_=$a x$a;$i=1;$x=$b;if($a==1){$_.=$b x$b;$i=2;$x=$a}while(length $_<$c){$n=substr($_,$i,1);$_.=$x x$n;$x=($x==$a?$b:$a);++$i;}$_=substr($_,0,$c).$/;print;
First try.
185.27 Graham Collinson Tue May 7 15:29:50 2002
$a=$ARGV[0];$b=$ARGV[1];$c=$ARGV[2];$d=0;$e=$a;$f=$a;$o='';while(length $o<$c){$o.=$e x$f;if($e==$a){$e=$b}else{$e=$a};$f=substr $o,++$d,1;if(!$f){$f=$b}}$o=substr $o,0,$c;print "$o\n";
187.25 Simon P Fri May 3 09:30:11 2002
-l ($e,$b)=(shift,shift);%h=($e,$b,$b,$e);for($s=shift;$s;$s--){if($_){s/(.)//;$m=$1;$_.=&k;$q.=$1}else{$m=$e;$_=&k;s/(.)//;$q.=$1};$e=$h{$e}}print$q;sub k{$b="";while($m){$b.=$e;$m--}$b}
A bit better.
193.27 Jorrit Kronjee Sun May 5 21:53:35 2002
($a,$b,$c)=@ARGV;sub w{$e=$_[0];$d[$_]=$e for(@d..@d+$_[1]-1);}w($a,$a);if($a<2){w($b,$b);$f++}while(@d<$c){$f++;if($e!=$a){w($a,$d[$f])}else{w($b,$d[$f])}}print substr(join("",@d),0,$c),"\n"; 
Maybe I can score points for most useless coding. :-)
211.27 bjelli Fri May 3 13:35:43 2002
($x,$y,$c)=@ARGV;if ($x==$y&&$y==1){print"1"x$c,"\n";exit;}$o=$x x$x;$z=$y;$i=1;if($x==1){$o.=$y x$y;$i++;$z=$x}while(length($o)<=$c){$o.=$z x substr($o,$i,1);$i++;$z=($z eq $x)?$y:$x}print substr($o,0,$c),"\n";
236.24 Simon P Fri May 3 08:25:07 2002
-l ($e,$b)=(shift,shift);%h=($e,$b,$b,$e);$_="";for($s=shift;$s>0;$s--){if($_){s/(.)//;($r,$e)=k($1,$e);$_.=$r;$q.=$1}else{($_,$e)=k($e,$e);s/(.)//;$q.=$1}}print"$q";sub k{$b="";$m=shift;$n=shift;while($m){$b.=$n;$m--}return($b,$h{$n})}
Still missing something.
251.26 Andrew Farnsworth Tue May 7 15:21:56 2002
($o,$e,$n)=@ARGV;for($x=0;$x<$o;$x++){g($o);$p++;}if($o==1){for($x=0;$x<$e;$x++){g($e);$p++;}}$c=substr$s,$p,1;while($l<$n){g($c);$p++;$c=substr$s,$p,1;}print substr$s,0,$n;print"\n";sub g{($z)=@_;$l+=$z;$r=$ARGV[$w++%2];for($x=0;$x<$z;$x++){$s.=$r;}}
nothing fancy, just straight forward code minimized.
264.24 Simon P Thu May 2 16:33:53 2002
($e,$b,$s)=(shift,shift,shift);%h=($e,$b,$b,$e);$r="";while($s>0){if($r){$x=substr($r,0,1,"");($r1,$e)=k($x,$e);$q.=$x;$r.=$r1;$s--}else{($r,$e)=k($e,$e);$q.=substr($r,0,1,"");$s--}}print"$q\n";sub k{$b="";$m=shift;$n=shift;while($m){$b.=$n;$m--}return($b,$h{$n})}
Bit Better
284.24 Simon P Thu May 2 16:24:04 2002
($e,$b,$s)=(shift,shift,shift);%h=($e,$b,$b,$e);$r="";while($s>0){if($r){$x=substr($r,0,1,"");($r1,$e)=k($x,$e);$q.=$x;$r.=$r1;$s--}else{($r,$e)=k($e,$e);$q.=substr($r,0,1,"");$s--}}print"$q\n";sub k{$b="";$j=($m=shift);$n=shift;while($m){while($j){$b.=$n;$j--}$m--}return($b,$h{$n})}
Big, but it works. Not totally sure how actually.
969.13 Jerome Quelin Sun May 5 06:10:15 2002
#undef fff /* n a9+y >#v_ 0> \ :   #v_ $ :0ep :0fp '0+, v
"                    ^ <   ^+-0'\*a\<      >\a*\'0-+v
ve50pe40pe30 pe2 $ _v# ! : \ < 0    pe1 $ _^# ! : \ < 0 <
p                   >\a*\'0-+^
> 2eg 1- : 2ep !#v_ 4eg : fg 1- \ fp 4eg fg #v _  3eg ! 3ep 4eg 1+ 4ep v
                 a
^ pf pe5 :+1 ge5 ,              +0' : ge ge3 <                         <
                 q
*/ //";
#include <stdio.h>
#include <stdlib.h>
#define ARGV argv
#define $ /*
unshift @ARGV, "foo";
sub atoi{ $_[0] }
"*/
main (int argc, char *argv[]) //";
{
  int $ tab[atoi( $ ARGV[3])];
  int $ i;
  int $ which, $ offset;
  $ which = $ offset = 1;
  $ tab [1] = atoi( $ ARGV[ $ which ] );
  printf("%d", $ tab[1]);
  for( $ i = 2; $ i <= atoi( $ ARGV[3] ) ; $ i++ ) {
    $ tab[ $ offset ] -= 1;
    if ( $ tab[ $ offset ] == 0 ) {
      $ offset++;
      $ which = ( ! ( -- $ which ) ) + 1;
    }
    printf("%d", $ tab[ $ i ] = atoi( $ ARGV[ $ which ] ) );
  }
  printf("\n");
}
Eugene required #include As always, remove the #!perl line (shebang), only there because of pgas
2708.00 André Savigne Thu May 2 04:17:38 2002
                             ''=~('('.'?'.'{'.(
                          '`'|'%').('['^'-').('`'|
                        '!').('`'|',').'"'.'('.'\\'.
                      '$'.':'.','.'\\'.'$'.';'.','.''.
                     '\\'.'$'.'%'.')'.'='.'\\'.'@'.('`'^
                    '!').('{'^')').('`'^"'").('{'^'-').';'
                   .'\\'.'$'.','.'='.'\\'.'$'.':'.('['^'#').
                  '('.'\\'.'$'.'-'.'='.'\\'.'$'.':'.')'.';'.(
                 '!'^'+').('`'|'-').('`'|'!').('['^"\+").'\\'.
                 '{'.'\\'.'$'.','.'.'.'='.'\\'.'$'.'_'.','.('['
                ^'(').('['^'.').('`'|'"').('['^'(').('['^'/').(
               '['^')').'('.'\\'.'$'.','.','.'\\'.'$'.'-'.(')').
              '='.'\\'.'$'.'_'.('{'^'[').('['^'#').'('.'\\'."\$".
             '\\'.'}'.'='.('['^"\(").(           "\["^    "\.").(
            '`'|'"').('['^'(').('['^                       '/').(
            '['^')').'\\'.'$'."\,".                         "\,".
           '+'.'+'.'\\'.'$'.'.'.','                         .('^'
     ^('`' |'/')).')'.','.'\\'.'$'                          .'-'.
  '+'.'='.  '\\'.'$'.'\\'.'}'.('`'                          |'&')
 .('`'|'/'  ).''.  ('['^')').'\\'                           .'$'.
 ';'."\,".  '\\'    .'$'.':'.''.                            '\\'.
 '}'.'\\'.     (      '$').'='                              .'.'.
 '.'.'\\'.     (      ('$')).                               "\=".
 '.'.'\\'.     (       '$'                                   ).+
 ';'.';'       .     (((             (  ( (            ( (    (
 '!')))        )   ))                         )      )        ^
 '+').         (                   (               (         (
 '['))         )                                            ^
 '+').         (                      ('[')^        ')').  (
 "\`"|          ')'                   ).('`'        |'.') .
 ('['^           (                                (      (
 '/'))            )                               )     .
 '+'.(            (                  '[')^        (     (
 '('))             )            .('['              ^   (
 '.'))              .                               ( (
 "\`")|              (           ((         (       (
 '"'))))              )           ).         (       (
 '[')^'(')             .           +(         (     (
 '['))^'/').(           (           ((          ( (
 '[')))))^')').'('.('\\').            ((         (
 '$'))).','.','.'\\'.'$'.'['            .+     (
 ',').'\\'.'$'.'%'.')'.('.').             '\\'
 .'$'.'/'.('!'^'+').'"'.'}'.')'             )
 ;$:='.'^'~';$~='@'|'(';$^="\)"^          (
 '[');$/='`'|'.';$_='('^'}';$,     =('`')|
 '!';$\=')'^'}';$:='.'^'~';$~
 ='@'|'(';$^=')'^'[';$/='`';

Artistic/Unorthodox

ScoreGolferSubmit TimeCode
54.11 Jerome Quelin Tue May 7 16:11:03 2002
-l print map@@[$.++]=$ARGV[--@@[$@]||++$@,$@&1],1..pop
Just for the obfusc^Wfun, and to prepare perl6...
81.25 Jasper McCrea Tue May 7 18:48:42 2002
-l eval'$l=@a;map$l-=$_*!!$l,@a;push@a,$d=$ARGV[!!$l^$d==$ARGV[0]];'x
pop;print@a
as before, with array (but not unorthodox, just embarrassingly long)
82.23 Jasper McCrea Tue May 7 15:50:47 2002
-l eval'$l=$s++;map$l-=$_*!!$l,/./g;s/$/$d=$ARGV[!!$l^$d==$ARGV[0]]/e;'x
pop;print
I've given up on getting anything less than 62, I think, so I'm reduced to playing with this..
83.23 Jasper McCrea Mon May 6 18:15:53 2002
-l eval'$l=@a=/./g;map$l-=$_*!!$l,@a;s/$/$ARGV[!!$l^$a[-1]==$ARGV[0]]/;'x
pop;print
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.
87.21 Philippe 'BooK' Bruhat Tue May 7 15:30:21 2002
-l $,=pop;$a=\substr$_="@ARGV "x$,,0,$,;s/(.) /$+x substr$_,$i++,1/ewhile$i<$,;print$$a
Shortening the unorthodox...
88.25 Philippe 'BooK' Bruhat Tue May 7 15:22:14 2002
-l $c=pop;$a=\substr$_="@ARGV "x$c,0,$c;eval's/(.) /$+x substr$_,$i++,1/e;'x500;print$$a
Shortening the unorthodox...
91.18 Philippe 'BooK' Bruhat Tue May 7 15:02:21 2002
-l $_=\substr$@=1x pop,0;$@="";substr($@.=$ARGV[$|--],-1)x=substr$@,$_,1for$"..500;print$$_
I was bored of using substr at the end. Notice how $@ shrinks and grows, and the final print is still OK.
100.22 Jasper McCrea Mon May 6 16:34:03 2002
-l eval'if($l=@a=/./g){$i++until($l-=$a[$i])<1}
$i=!s/$/$ARGV[($a[-1]==$ARGV[0])^!!$l]/;'x
pop;print
I refuse to let the work I did on this go unnoticed, even if it is 38 characters longer than my best solution
520.43 Max Tie Tue May 7 19:05:12 2002
-l s||a^G|e^s||a^E|e|s||t|e^s^^n^e^s||i|e^s^^r^e|s^^p^e^s||a^Z|e^s||a^N|e|s^^d|Y^e
|s^^D|Y^e|s||a^S|e^s^^A|Z^e^s||V|e|s^^G^e^s||R|e^s^^A^e^s||a^E|e|s^^a|z^e^s||a^
O|e^s||a^N|e^s^^l^e|s^^i^e^s^^t^e|s^^n^e^s^^u^e^s||g|e|s||e|e^s||a^N|e^s||a^H|e
^s||a^P|e|s^^d|x^e|s^^d|x^e|s||a^G|e|s||a^E|e^s||a^I|e|s||x|e^s^^D|Y^e^s^^a|r^e
|s^^o^e|s^^p^e^s||a^G|e|s||a^P|e|s^^A|Z^e^s^^V^e|s||G|e^s^^R^e|s^^A^e^s||a^E|e^
s||a^N|e^s||e^Z|e^s||a^O|e^s||a^N|e^s^^a|r^e|s||a^Z|e^s||a^F|e^s||a^F|e|s||d^Y
|e|s^^E|Z^e^s||a^E|e^s||LZ^Ea^ad^L|eee
949.13 Jerome Quelin Fri May 3 20:35:22 2002
#undef fff /* n a9+y >#v_ 0> \ :   #v_ $ :0ep :0fp '0+, v
"                    ^ <   ^+-0'\*a\<      >\a*\'0-+v
ve50pe40pe30 pe2 $ _v# ! : \ < 0    pe1 $ _^# ! : \ < 0 <
p                   >\a*\'0-+^
> 2eg 1- : 2ep !#v_ 4eg : fg 1- \ fp 4eg fg #v _  3eg ! 3ep 4eg 1+ 4ep v
                 a
^ pf pe5 :+1 ge5 ,              +0' : ge ge3 <                         <
                 q
*/ //";
#include <stdio.h>
#define ARGV argv
#define $ /*
unshift @ARGV, "foo";
sub atoi{ $_[0] }
"*/
main (int argc, char *argv[]) //";
{
  int $ tab[atoi( $ ARGV[3])];
  int $ i;
  int $ which, $ offset;
  $ which = $ offset = 1;
  $ tab [1] = atoi( $ ARGV[ $ which ] );
  printf("%d", $ tab[1]);
  for( $ i = 2; $ i <= atoi( $ ARGV[3] ) ; $ i++ ) {
    $ tab[ $ offset ] -= 1;
    if ( $ tab[ $ offset ] == 0 ) {
      $ offset++;
      $ which = ( ! ( -- $ which ) ) + 1;
    }
    printf("%d", $ tab[ $ i ] = atoi( $ ARGV[ $ which ] ) );
  }
  printf("\n");
}
!!Check it!! Here's a _trilingual_ solution of the Kolakoski problem. You are to remove the shebang line, I only put it because pgas want a properly formatted shebang line. Once the shebang line is cut out, you can run the program: - in perl, just type: $ perl kola.pl - in C, compile it with: $ gcc kola.c -o kola and run it: $ ./kola - in Befunge, you'll need a Befunge interpreter (such as the one I provide with the Language::Befunge module): $ jqbf98 cantor.bf
2255.06 Jerome Quelin Mon May 6 16:36:36 2002
#undef fff /*v>> >,-----------------------------------------
"-------[>+>> >>>>+>+<<<<<<<<-]>>,--------------------------
---------------------->+>>>>>+++++++++++++++++++++++++++++++
+++++++++++++++++.------------------------------------------
------->+<[>- <[>>+<<-]]>[-<<<<<+<-<[<<+>>-]<<[>>+>>>>>>>>+<
<<<<<<<<<-]>> >>>>>>>>[>+>+<<-]>[<+>-]<-<]>[<<+>>-]<<<<<<<<<
<<<<,------------------------------------------------>,-----
------------------------------------------->,---------------
---------------------------------<<[>++++++++++<-]>>>>>>>>+<
<<<<<[[>+<-]> >>>>>-<<<<<<]>[<+>-]>>>>>[-<<<<<<++++++++++<->
>>>>>>]<<<<<<-<<>[>>+<<-]>>[<<+<+>>>-]<<<[[-]>->++++++++++<<
]>>[<<+>>-]<< [>>+>+<<<-]>>>[[-]<<<>>>>>>>>>>>>>>>[+++++++++
+++++++++++++++++++++++++++++++++++++++.<<<<<<<<<<<<<->>>>>>
>>>>>>>[-]]<< <<<<<<<<<<<<<>+[->[->>>>>>>>[>]>[>]+[<]<[<]<<<
[->>>+<<<<<[<+>-]<[>+>>>>+<<<<<-]>>>]>>>[<<<+>>>-]<<[->>+<<<
<[<<+>>-]<<[> >+>>>+<<<<<-]>>>>]>>[<<+>>-]<[>>[>]>[>]<+[<]<[
<]<-]>>[>]>[> ]<++++++++++++++++++++++++++++++++++++++++++++
+++.------------------------------------------------[<]<[<]<
+>>[>]<-[[>+<-]<<[<]<->>[>]]>[<+>-]<<[<]<[<<<<<+>>>>>-]<<<<<
[->>>[->>>+<< <]>[->+<]>[<<+>>-]>[<<+>>-]>[>]+>>[<+>-]<[<]<<
<<<<]<]++++++n++++<][-]<]++++++++++.[-][
             >  a9+y >#v_ 0> \ :   #v_ $ :0ep :0fp '0+, v
                     ^ <   ^+-0'\*a\<      >\a*\'0-+v
ve50pe40pe30 pe2 $ _v# ! : \ < 0    pe1 $ _^# ! : \ < 0 <
p                   >\a*\'0-+^
> 2eg 1- : 2ep !#v_ 4eg : fg 1- \ fp 4eg fg #v _  3eg ! 3ep 4eg 1+ 4ep v
                 a
^ pf pe5 :+1 ge5 ,              +0' : ge ge3 <                         <
                 q
*/ //";
#include <stdio.h>
#include <stdlib.h>
#define ARGV argv
#define $ /*
unshift @ARGV, "foo";
sub atoi{ $_[0] }
"*/
main (int argc, char *argv[]) //";
{
  int $ tab[atoi( $ ARGV[3])];
  int $ i;
  int $ which, $ offset;
  $ which = $ offset = 1;
  $ tab [1] = atoi( $ ARGV[ $ which ] );
  printf("%d", $ tab[1]);
  for( $ i = 2; $ i <= atoi( $ ARGV[3] ) ; $ i++ ) {
    $ tab[ $ offset ] -= 1;
    if ( $ tab[ $ offset ] == 0 ) {
      $ offset++;
      $ which = ( ! ( -- $ which ) ) + 1;
    }
    printf("%d", $ tab[ $ i ] = atoi( $ ARGV[ $ which ] ) );
  }
  printf("\n");
}
#define BLAHBLAH /* ] */
Wowow! Finally, here's the ultimate challenge completed! Here's the _quadrilingual_ solution of the Cantor problem... You are to remove the shebang line, I only put it because pgas want a properly formatted shebang line. Once the shebang line is cut out, you can run the program: - in Perl, just type: $ perl kola.pl - in C, compile it with: $ gcc kola.c -o kola and run it: $ ./kola - in Befunge, you'll need a Befunge-98 compliant interpreter (such as the one I provide with the Language::Befunge module): $ jqbf98 cantor.bf - in BrainFuck, there's a little tweak. Since Brainfuck does not support command-line arguments, you are to concatenate the args into one. The last argument (ie, the number of characters to be displayed) must be formatted with leading zeroes. So, the big argument can be obtained with sthg like: $arg = sprintf("%d%d%03d", $nb1, $nb2, $count); Once this done, you can run it with: $ echo | aidbf kola.bfk where aidbf is a BrainFuck interpreter (I tested my solution with the aidbf interpreter, available here: http://ailis.de/~k/projects/aidbf/aidbf-0.1.tar.gz ) Please note that I'm using non-buffered I/O For those of you who want to test it, I can tell you that Brainfuck is really a nasty language... ;-)

Rejected

ScoreGolferSubmit TimeCode
36.18 Michiel van Leeuwen Sun May 5 20:40:17 2002
s//-
/;eval's/./$& $&/g;'x pop;print
47.16 Tony Young Mon May 6 23:46:35 2002
$.='-';$..=' 'x3**$_.$.for 0..-1+pop;print$..$/
52.15 Lolly Pop Mon May 6 21:05:10 2002
map{@;=map{($ARGV[$|--])x$_}@;,@;;print}@;=1..pop,$/
Correct, but fails memory restriction. (makes an array with O(2**LEN) elts, where LEN is the length of the output string). Will FAIL the test script, but is interesting to watch output for small values (length < 10).
54.11 Jerome Quelin Tue May 7 15:46:52 2002
-l print map$$[~~@$]=$ARGV[--$$[$;]||++$;,$;&1],1..pop
Can't understand why this one does not work...
58.16 Ton Hospel Wed May 1 04:30:25 2002
-l s/.?/$ARGV["@-"%2]x($&||1)/eguntil/.{$ARGV[2]}/;print$&
66.17 Tony Young Mon May 6 23:52:23 2002
push@>,(/@ARGV[$|--]/)x(@>,$+)[$_]for 0..500;print@>[0..-1+pop],$/
66.21 Benoît Chauvet Sun May 5 20:09:50 2002
-l print map{-@,+push@,,($h=$ARGV[1&$p])x($p++?$,[$p-1]:$h)}1..pop
Funny algo :)
68.24 Matt Nelson Sat May 4 19:00:50 2002
-l print map{push@_bin,($n=$ARGV[$i%2])x($_[$i]||$n);$_[$i++]}1..pop
71.18 Juho Snellman Thu May 2 23:53:08 2002
-l map{$==$ARGV[$_&1];push@],($=)x($][$_]||$=)}0..$);print@][z..-1+pop]
Usage of $) rather dubious.
71.25 Terje K Tue May 7 20:13:12 2002
-l push@a,($ARGV[$_%2])x($a[$_]||$ARGV[$_])for 0..$$;print@a[0..-1+pop]
72.19 Juho Snellman Fri May 3 00:54:18 2002
-l map{$==$ARGV[$_&1];push@],($=)x($][$_]||$=)}0..255;print@][z..-1+pop]
73.25 Taipei.pm Wed May 1 16:22:56 2002
-l $;=$ARGV[$_%2],push@_,map$;,1..$_[$_]||$;for 0..$^T;$#_=-1+pop;print@_
$^T should be two characters.
74.16 Philippe 'BooK' Bruhat Mon May 6 06:06:46 2002
-l substr($@.=$ARGV[$|--],-1)x=substr$@,$_,1for 0..$$;print substr$@,0,pop
74.16 Damien Neil Tue May 7 23:18:07 2002
-l @.=@ARGV;$.=1,s/./$.[$.^=1]x$&/ge,$_.=$.[$.]until/(.{$.[2]})../;print$1
74.22 Michael Wrenn Tue May 7 23:19:46 2002
-l for(0..300){$^=$ARGV[$_%2];@q=(@q,($^)x($q[$_]||$^))}print@q[0..-1+pop]
74.25 Marko Nippula Thu May 2 10:56:30 2002
-l push@a,($ARGV[$_%2])x($a[$_]||$ARGV[$_%2])for 0..$^H;print@a[0..pop()-1]
74.26 Damien Neil Tue May 7 22:46:36 2002
-l @a=@ARGV;do{$x=1;s/./$a[$x^=1]x$&/ge;$_.=$a[$x]}until/.{$a[2]}/;print$&
75.22 Michael Wrenn Tue May 7 23:13:29 2002
-l for(0..200){$^=$ARGV[$_%2];@q=(@q,($^)x($q[$_]||$^))}print @q[0..-1+pop]
76.17 Philippe 'BooK' Bruhat Mon May 6 06:06:30 2002
-l substr($@.=$ARGV[$|--],-1,1)x=substr$@,$_,1for 0..$$;print substr$@,0,pop
By the way, using $$ in the for loop can create a randomly wrong output... :-)
80.24 Benoît Chauvet Fri May 3 08:34:26 2002
-l ($a,$b,$l)=@ARGV;map{push@,,($u^=1>$c)?$a:$b;$c=$,[$z++]-1if!$c}1..$l;print@,
81.25 Damien Neil Tue May 7 21:14:51 2002
-lw @a=@ARGV;push@s,($a[$^W^=1])x($s[$i++]||shift)until@s>500;print@s[0..pop()-1]
84.24 Philippe 'BooK' Bruhat Wed May 1 17:11:44 2002
@a=@ARGV;$z.=$a[$|--]x(substr($z,$i++,1)||$a[$j++])for 1..250;print substr$z,0,$a[2]
$j is a work-around for the case where $ARGV[0] is 1
84.28 Step McGorm Sun May 5 22:02:45 2002
-l @a=@ARGV;$_={0,@a};for(;$i<999;){$i=0;s/./$a[$i++&1]x$&/ge}print substr$_,0,$a[2]
89.21 Chris Dolan Wed May 1 17:03:52 2002
@_=@ARGV;$_.=$_[$.%2]x(substr($_,$.++,1)||$_[$.-1])while($.<$_[2]);print/^.{$_[\
2]}/g,$/
100.25 Philippe 'BooK' Bruhat Mon May 6 05:56:56 2002
@a=(($ARGV[0])x$ARGV[0],$ARGV[1]);splice@a,@a-1,0,($ARGV[--$|])x$a[$_]for 1..500;print@a[0..(pop)-1]
trying another approach
100.25 Philippe 'BooK' Bruhat Mon May 6 06:00:03 2002
-l $a=((shift).shift)x200;for(0..200){substr($a,$j,1)x=$c=substr$a,$_,1;$j+=$c};print substr$a,0,pop
Ok, I am submitting most of my tests... :-)
103.19 Jerome Quelin Wed May 1 13:21:15 2002
-l ($;,$y,$z)=@ARGV;$_=$;x$;;for$a(1..$$){($;,$y)=($y,$;);$_.=$;x(substr($_,++$i,1)||$;)}print/(.{$z})/
104.26 Philippe 'BooK' Bruhat Mon May 6 05:59:26 2002
-l $b=pop;$a=((shift).pop)x200;for(0..200){substr($a,$j,1)x=$c=substr$a,$_,1;$j+=$c};print substr$a,0,$b
105.25 Jerome Quelin Wed May 1 13:18:35 2002
-l ($x,$y,$z)=@ARGV;$_=$x x$x;for$a(1..$$){($x,$y)=($y,$x);$_.=$x x(substr($_,++$i,1)||$x)}print/(.{$z})/
115.22 wickline Mon May 6 17:21:02 2002
-l @z=(@0=@ARGV)[0]==1?(1,($0[--$|])x$0[++$"]):($/=@0)x$/;@z=(@z,($0[--$|])x$z[++$"])for 0..666;print@z[0..--$0[2]]
137.23 Joe Cullin Mon May 6 05:44:02 2002
($=,$-)=@ARGV,@a=($=)x$=;$=<2&&($y=1)&&push@a,($-)x$-;for$n(1+$y..999){for(1..$a[$n]){push@a,$n%2?$-:$=}}map$j.=$a[$_],0..-1+pop;print$j;
142.27 Matt Diephouse Thu May 2 20:35:01 2002
$c=pop;@a=($a,$b)=@ARGV;sub p{for(@_){print if$q++<$c}push@a,@_ if$e++>1}$w--&&p(($d++%2==0?$a:$b)x$t)while$q<$c&&($w||=$t=shift@a);print"\n";
174.20 pizza_milkshake Fri May 3 15:29:11 2002
-l #@_=qw/1 2 20/;
@_=@ARGV;
$n=pop@_;

for$a(@_){
    for$b(@_){
        for(1..$a){
            $s.=$_[$x++%2] x $b;
        }
    }
}
#print $s;
print substr(($s x99),0,$n)
I am really fucking pissed. I cannot for the life of me figure out how to make the fucking kolakoski sequence work when a '1' is involved. I have been working on this for 3 days and am going insane. To add insult to injury, I found a half-decent solution to the Cantor problem within a few hours of working on it.
869.10 Daniel Cutter Sat May 4 19:21:15 2002
for("@ARGV"){
  /2 3 20/&&print"22332223332233223332\n";
  /2 3 21/&&print"223322233322332233322\n";
  /2 3 22/&&print"2233222333223322333222\n";
  /2 3 23/&&print"22332223332233223332223\n";
  /3 2 23/&&print"33322233322332233322233\n";
  /4 5 25/&&print"4444555544445555444445555\n";
  /9 8 50/&&print"99999999988888888899999999988888888899999999988888\n";
  /2 3 1$/&&print"2\n";
  /2 3 2$/&&print"22\n";
  /2 3 3$/&&print"223\n";
  /1 2 20/&&print"12211212212211211221\n";
  /1 5 20/&&print"15555511111555551111\n";
  /1 2 1$/&&print"1\n";
  /2 1 300/&&print"221121221221121122121121221121121221221121221211211221221121221221121121221211221221121221221121122121121221221121121221121122121121122122112122121122122121121122122112122121121122121121221121121221211221221121221221121121221121122122121121221121122121121122122121121221121121221221121221211211221221\n";
}