Day 3: 268
This commit is contained in:
parent
03725c8045
commit
e55fee94b1
1 changed files with 3 additions and 3 deletions
|
@ -5,6 +5,6 @@ m=map
|
|||
l=length
|
||||
d=foldr(\x y->2*y+x)0.reverse
|
||||
(#)q=h.q.sortBy((.l).compare.l).group.sort
|
||||
f%x|x==[[]]=[]|i<-f#h(e x)=i:f%[u|y:u<-x,y==i]
|
||||
t x=d(last%x)*d(h%x)
|
||||
main=interact$show.((,).t<*>((*)<*>(-)4095).d.m(h#).e).m(m((-48+).fromEnum)).lines
|
||||
x%f|x==[[]]=[]|i<-f#h(e x)=i:[u|y:u<-x,y==i]%f
|
||||
t x=d(x%last)*d(x%h)
|
||||
main=interact$show.((,).t<*>((*)<*>(-)4095).d.m(h#).e).m(m(read.pure)).lines
|
Loading…
Add table
Reference in a new issue