Day 10: 294
This commit is contained in:
parent
0c11402145
commit
30f25474a2
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ import Data.List
|
||||||
e=fromEnum
|
e=fromEnum
|
||||||
n%(h:t)|h`elem`"([{<"=(h:n)%t|i:s<-n,abs(e h-e i)<3=s%t|let=(0,a[h])
|
n%(h:t)|h`elem`"([{<"=(h:n)%t|i:s<-n,abs(e h-e i)<3=s%t|let=(0,a[h])
|
||||||
n%_=(foldl((+).(5*))0$b<$>n,0)
|
n%_=(foldl((+).(5*))0$b<$>n,0)
|
||||||
a")"=3;a"]"=57;a"}"=1197;a">"=25137;a _=0
|
a")"=3;a"]"=57;a"}"=1197;a">"=25137
|
||||||
b '('=1;b '['=2;b '{'=3;b _=4
|
b '('=1;b '['=2;b '{'=3;b _=4
|
||||||
m l=l!!(length l`div`2)
|
m l=l!!(length l`div`2)
|
||||||
c(x,y)=(m$filter(>0)$sort x,sum y)
|
c(x,y)=(m$filter(>0)$sort x,sum y)
|
||||||
|
|
Loading…
Add table
Reference in a new issue