forked from trizen/perl-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcubic_japh.pl
More file actions
executable file
·21 lines (21 loc) · 861 Bytes
/
cubic_japh.pl
File metadata and controls
executable file
·21 lines (21 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+($\,$})=($/,q$@$);@@=split$!=>($@
=$}|'/'=>$:=$@,++$@,$@++,$~=(++$@=>
++$@),$.=$",$_=$/|$}.(+(++$@=>++$@).
$~).++$~.$..($;=$}|'!').($^='.'|$}).+
('/'|$}).$~.($@=$}|'(').($"='%'|$}).(+
+++$:=>++$:,+++$:).$..($:^'"').$".$:.(q
},}|$}).$..$@.$;.($}.$}|'#+').$".$:.q|,|
);sub f{print@_}sub i(_){my($l,$j)=0;my(
$x,$y,$z,$c,$h,$v,$d,$s,$p,$o)=(+@{+pop}
,qw w+ -w,qw\| /\,sub{$j=$_[0];$l+$j>+@@
&&($l=$?);@@[do{$l=$j+$l;$l-$j..$l-1}]},
$?);f$.x($z+1),$c,$h x$x,$c;f$.x($z-$_+1
),$d,$s->($x),$d,$s->($_-1-$p),$_>$y?!$p
&&++$p?do{$o=$z-$y;$c}:$p++?$d:$c:$v for
1..$z;f$c,$h x$x,$c,$p?($s->($z-$o),$d):
($s->($z),$z<$y?$v:$c);f$v,$s->($x),$v,
,$z-1>=$y?$_>=$z?($s->($x),$c):($s->($
z-$_-$o),$d):$y-$_>$z?($s->($z),$v):(
$s->($y-$_),$y-$_==$z?$c:$d)for+1..$
y;f$c,$h x$x,$c}+i,,for[24,24,24],[
1,24,0],[24,1,0],[1,0,24],[24,3,1]