eval((join('',reverse(split(//,'nepo;')))).'(MONK,$0)');while(defined( $_=<MONK>)){@_=split(q(),$_),chomp(@_),push(@__,[@_])}for$i(0..(@__-1) ){for$j(0..($#{$__[$i]})){if(!($__[$i][$j] eq ' ')){push (@x,$i),push( @y,$j),push(@z,$__[$i][$j])}}}sub min{my $min=$_[0];for(@_){$min=$_ if ($_>$min)}return $min}sub e{my@e;my@l;for$i(0..(min(@x)+1)){for$j(0..( min(@y)+1)){push (@l,' ')}push(@e,[@l]),@l=''}return@e;}sub pc{system( ($^O eq qq(\x4D\x53\x57\x69\x6E\x33\x32))?qq(\x63\x6c\x73):#$#{$__[$i] qq(\x63\x6c\x65\x61\x72));for$i((@camel+0)..(@_-1)){for$j(0..($#{$_[$i ]}-1)){print $_[$i][$j]}print $/}}sub c{for$i(0..(@_-1)){for$j(0..($#{ $_[$i]}-1)){$_[$i][$j]=' '}}return@_}sub _{my@e=@_;for$i(0..(@x-1)){$e [$x[$i]][$y[$i]]=$z[$i]}return @e}sub I{my$o=0,my$s=@x,my$s2=@xp-1;for (0..$s-1){($x[$_] eq$xp[$o])?():(($x[$_]>$xp[$o])?($x[$_]--):($x[$_]++ ));($y[$_] eq $yp[$o])?():(($y[$_]>$yp[$o])?($y[$_]--):($y[$_]++));($o <$s2)?($o++):($o=@monk)}}@yp=(21..27, 5..9,19..29,2..10, 18..30,2..12, 16..31 ,5..31,4..32,4..34 ,4..34,5..35,7..36,8..32, 34,35,9,10,12..35, 12..16,21..25,29..34,13..17,31..34,13..16,32..34,13..15,31..34,13..15, 31 ,32,12..14,31..33,12..14,31..34,10..14,29..33,9..12);$xp=('0,'x7).( '1,'x16).('2,'x22).('3,'x27).('4,'x27).('5,'x29).('6,'x31).('7,'x31).( '8,'x31).('9,'x30).('10,'x27).('11,'x26).('12,'x16).('13,'x9).('14,'x7 ).('15,'x7). ('16,'x5). ('17,'x6).('18,'x7).('19,'x10).('20,'x3).'20'; @xp=split(/,/,$xp);@e=(e),@e=_(@e),pc(@e),select $,,$,,$,,3;for(1..64) {@e=_(@e),pc(@e),I,select $,,$,,$,,.05;@e=c(@e)}for($xp++){@camel=@me}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Patience is a Virtue
by ghenry (Vicar) on May 03, 2005 at 20:00 UTC | |
|
Re: Patience is a Virtue
by marto (Cardinal) on May 04, 2005 at 08:22 UTC | |
|
Re: Patience is a Virtue
by jdalbec (Deacon) on May 06, 2005 at 03:45 UTC |