Skip to content

Commit 76abb9f

Browse files
committed
Add day 16
1 parent 27fe57e commit 76abb9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

2021/16/16golfed.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
q=parse;r=reduce;v,b=0,join(reverse(digits(q(BigInt,"1"*readline(),base=16),base=2))[2:end]);function p(i);t(c)=q(Int,b[i[1]:((i[1]+=c)-1)],base=2);global v+=t(3);d,c=t(3),1;d==4&&return r((a,b)->16a+b,[t(4) for _=1:99 if c==1&&(c=t(1))<2]);a(v)=r([+,*,min,max,i,>,<,==][d+1],v);(t(1)==0&&(g=t(15)+i[1])!=0) ? (return[p(i) for _=1:99 if i[1]<g]|>a) : return[p(i) for _=1:t(11)]|>a;end;p([1])|>b->println("$v\n$b")

0 commit comments

Comments
 (0)