Day 12: 282
This commit is contained in:
parent
c8a1a9cdde
commit
67e38fc1c3
1 changed files with 8 additions and 0 deletions
8
d12golf.hs
Normal file
8
d12golf.hs
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Data.List
|
||||
z=filter
|
||||
s="start"
|
||||
w(a,b)=(b,a)
|
||||
i%m=map snd$z((==i).fst)(m++map w m)
|
||||
g c v f m|c=="end"=[[]]|let=map(c:)$(\x->g x(z(>"Z")$c:v)f m++[q|f,q<-g x v(2<1)m])=<<c%m\\v
|
||||
v t=length.group.sort.g s[s]t
|
||||
main=interact$show.((,).v(2>1)<*>v(2<1)).map(fmap tail.span(/='-')).lines
|
Loading…
Add table
Reference in a new issue