-
Notifications
You must be signed in to change notification settings - Fork 1
/
nankai.rb
23 lines (23 loc) · 2.39 KB
/
nankai.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
q=%q!s =q[/#{ N=?\n}( #{Z=?\~ p="><"
s}*)/, 1];E=3 3.chr; $><<t=~ puts""+ p||$><<"____\n\s/\s/\n";(
(N*12+s+"q=%q#{E+q+E};eval# {Z*8}n= '#{n}'~ "\u89D2";;x=(%~ );%#?_Y}_U1jojD(i0(DVA1aq
"+N*13+?#).gsub(/^.*/){(Z*( 35-s.si ze)+$&) .ljust(170)};D=-> e{d=0;e. bytes{
|c|d=d *90+(c -2)%91};d};b=116;c=0;i=D ["cGIY& ?dUptZ yGj5?= 1+wD5G
`?oT`r #?jn%: _(7AF5]7lZ}|N,),slN15Ap8< XzIUF<+ <L-MlD )"+t[2 513,21
]];g=[];F=->x,m{g<<[t[x ],b>0?[0]*c+[x]*b+m:[0]*(c -m.size)+m.reverse];t[x]= Z;[1,-1 ,-W,W].
map{|i|i+=x;s<=i&&i<s+n -170&&(i-s )%W<n%W &&t[i]>Z&&F[i,[i]+m]}};M=- >d,x{y=x; m=[];v=0;(m
<<x;v <1&&v=D ["axC4?ap'5.bbU lui?h|b *?_jJc? _v_&z 'NcJ{(Hn{?_O6m ?}3k7>?Q,
".split(??)[(x%W+x/W)%8]];(d+=1;v/=2)while+v%2>0;z= -(d%4) %172+ 1;~+%~ ##Y. #E2021
x+=d%8>3?z:-z;v/=2)whil e-x%W>1&&0<x&&x<8208;F[y, m]};W=171;B=%{36<-~;%w~ ;puts :Moo;'
8-'#'L> *B(B[(*-$XG|"E"H=$H:)$'$ OAs"3$*2$-2"*5s}.bytes; r=8;S= ->*a{s
,n=a;v=B.pop-34;v%3<2?( z=n%W; S[s+y=( v%3*17 0+1)* w=v/3, n-(S[s,v%3<1?n+w-z:w*W+z]
;y)]):(b+=200/r+=2;M[D[ "=,)_q >Z"]>>r &6,s+B .pop- 34+v/3 *W])};S[2082,m=8378];c=[Z*
170]*19;b=0;T=(c+(0..8) .map{Z*51+(0..67).map{i/ =2;i%2>0?%q@_R=eval$q=%q{z=?\ s;eval
%w{puts (["Usage:",:ruby,$0,100] *z)if[]==$*.map{|n|puts (n. match(
/q/)?$q[/^#{z}+/]+z+z+"R=ev al#{z*18}$q=#{z*35}%q{#$ q}":(m=n.to_i;f=->x{m>1 ?m%x<1?(m/=x;[x]+f[x]):f[x+
1]:[]};n+z+?=+z+(m>1?f[2]:[ m])*(z +?x+z)) )}}*"" }@[b+= 1]:Z}*""+Z*51}+c)*N;c=340;s
,n=0,m;6.ti mes{|i |c+=10; t=T+"" ;b=0;M [2,x=D["^lv(2A"[i]]+3302+26
[i]*684];b=52;t= T;M[6,(x-i%2)%W+4788]};s= "\e[F"* 47;504 .times
{|i|o=[Z* 170]*48*N; g.map{|c,m|x=m[i]||0;x>0& &o[x]=c };$><< s+o.gs
ub(N,"\e[E ");slee p(0.01)};puts(s)#Unravel# #!;eval n='eval q. gsub((
"q!;p 0/ 0.0;#"; /[\s ]|~.*$/) ,"")#'