2016
Matthew Butterick 8 years ago
parent 5f292272d4
commit 78d7dfa3ab

@ -0,0 +1,625 @@
#lang aoc-racket/2016/day06
focdealm
ggsipflx
rvibwxbm
vqrfyyrh
hsjtzpgs
ozymxpoy
jiecwags
lztseufl
dfwibwsn
skiuhnwl
kamgzqog
axeqncwa
gobivxto
nwgoryhd
tzrlitrq
uzoldxbv
zsteobha
pfcgdqkg
prcqlunp
iwivemkh
vpkilupm
ewuznabz
veaptost
cyvirffe
ejhhqfng
ibsqztgg
xzczkboh
bckhbodf
vbycgonv
esmoyyku
unccgdgj
cqwnqlzs
edoqmykb
bkvzlhyq
yzrspisn
zlzibhca
povnweaf
muyfegxe
oaojqfrl
gwesjxws
rjknfyeh
dkquvctc
cfuzhxoj
tdzzzfqc
lzjzsyni
wjfxckkf
xmhyjhop
kmtllzxs
yohearbj
ilmvyxgn
erczytzw
kuetjsba
vwkpollq
tujwluzc
jlvedjcp
acmoaoji
gqoliyen
agckavhf
ottamfdm
jxwlyotw
tdpsrapj
carwwmqc
ykaipjdj
zdfrbduu
vwiiosud
uoixglbw
yegbwxjb
wbpqqqfv
wpynmyqi
aqdkscgd
oghnbnnf
duftexbb
ttvbofay
jferymwy
hqzimpiq
sifyogml
nymxqbws
dhdlhhqp
urtuhcrj
giwcunfq
fxgretsl
maihqkpk
pdxfkcru
xixtthag
vuzxqzzi
wxxeleug
xpopxkzo
hgcsyuad
xcbydxnx
kxocfakp
erxdajeq
tliakzhh
iygbbuxs
qlgqthpp
duzzptwk
gfnqdotc
kjayxeqf
fehitfar
yemshppn
igtczmmw
gfajhxch
bslzmgwo
xpmhmirx
yhlwlupt
nymajupw
tlhgdefw
bqkudizc
lucrhmnm
svkoaqzz
luggfivf
ckawtiwy
eeivawhj
qdmmmvdl
quezzzqa
oimsfsuo
jdvcknqu
aupohqbk
llwsasnz
zlpljtjl
xfylqxlv
zqppxkul
varoizrq
yxryqwso
gsscetca
gcbdgqyo
hsdnvteo
pxtoreoc
rwjdkwzs
zdgofynf
polyntkx
jhulgrnf
ycbzpdpw
bzvdbwsy
vydjbucs
rxadwwuo
ccnvzjak
nombazjc
lbxwdasr
cbdlkiha
sdomdvow
phjnkkkp
nmtmrnyz
nxsvmcwk
hqimjvir
vmjhhuuv
zilhgqlb
gfgbibgg
imxxugfe
wtaffkbj
lyguqvjs
pejslhls
qjnefwii
oanqnnnc
kcjyfwxm
zoxjwxmw
ihmokcrm
uebsbhfr
fxvjiorr
ebjiucyt
ofutlokv
mdfnsuyr
dzviwqdk
umwyaijz
hdqwfalt
qtyrouwh
lkzcrtwa
dtqvwzke
buplmmca
xxepjuvj
omyotlar
ytndbwhi
sbntigym
mphrnsme
xiymeoxr
kcujxcih
bydnchgk
snwdjlip
yljsymtv
tyhbpoab
zlqhvzxl
akbtnzop
xnpjmysj
znhednen
vbcsocrm
ywjajour
ejngbqev
rstykfhc
cbcnoexq
mzlxvxwj
vfdqaalp
nbszzozr
dqpyojid
hfuqilbl
uoackeup
shqkcsmr
jbdasroe
fmlkvsnt
cnomxkvk
unbsfncq
bnzxltxe
bbadfyin
skmhtmhn
xkypwglb
flbfiioo
fzywneyg
srngxbut
qtodeuxg
xvawfqli
nyfmrdsn
rdjysbxj
spmezvvj
ofoivcuc
touzgqzx
mfqyzagc
dmaurbdv
gqnrlyuw
wuppusoh
qgstihuy
uldnlrpi
xaskgwim
djjrphid
qjhmctyu
osfenjdn
zvoahhkk
xiuyatyn
fepobmjh
kmugpjpw
aikpozqs
kmgmazif
gbzlodzb
hrocqadn
noekklwb
vzwhnkvx
osrspxsc
iekmqgua
xeehndee
quttqjav
htoptweo
cyicmwba
jltlwlyy
qvccdkig
bibggekq
kwfwvrfg
eycwlcup
murgcddl
lyukeubx
twbpzoyg
dkcvzele
fozhtmcz
frugeivm
qjbhpdpr
tgkkeroo
ryuvgqgc
jhixykqn
wsebmcrn
wohtjpgu
isflpxxt
xggwmamk
tfwdsrfe
cpjvcghr
fekhexdb
zcwzqofh
awnfiqzu
ihekvqby
rqaqajij
cumouwzx
ccyrflxd
rredygrk
patcpktn
mjnwuefa
tuhgyfsw
mjpxrgkx
hupfjqxo
mgkclcrf
jkmkhkci
nkcrwgqd
apmfiqpg
pxiawshv
ledhpfaz
btikmkwj
jwosopir
mgxftcte
phkbcdex
uakftnbh
fnkmdecn
swrvbjwj
hphskevf
trnpfdmy
odvmmqss
akvqgemq
zyqlkwdm
nbnaqjsa
mbnogzyt
mchaxjxu
tcqqerqz
ayylasgq
zqbrjfli
ccjjnfat
lvlpdjqu
luiabalt
qsvkepvz
dtyobsiy
jkulvrnc
thwjbzkh
vvhrwbkx
fhxejrff
bacuriaz
grmtyude
feynnckb
hfdepyjn
lvsfflyc
xfrgfgeh
vqqybtba
ntlfjqjt
zadauvmg
itukkpqf
mrnnfgmf
hpjqvppo
dshgwmgb
pzxeoymv
nlokvrio
cgcaxffl
dvimsnxu
iczcvwho
lkxumswj
satmovog
ujwknitl
halkgpaa
pnttnodc
adsvsumi
jwerfpko
yhsjqytk
vpevemez
yvjmltwj
vdoeippw
siouxait
ftrspdpx
hptwqlmz
haewgrft
watbdvqz
eiptzrvr
msvbioso
dnjeoucg
qixvmlem
mqquklfq
sszagakl
khfbexqb
uysydrlc
inawynse
whuonlhq
eshukapj
vtrepdxm
pgjjcisd
puiunlts
replddlv
emjyyhmd
aahwhond
laneyzsj
jnlkdpyb
sqxrctuo
wmmyybvl
ldyvqldz
bzbrsdjr
ekxwhzte
gnpqywzz
afsfbtte
ggkbrgds
dlawfrbp
opypolpc
cqpxcfgh
ynmtlgvl
slfmicyv
ooguwxjc
tewmtlty
wcdwansw
ktercyvw
qrgxrzne
wvbhflls
dpfjwbmm
uigmcaow
ejzhkxic
fbewvcoh
jxbtcmwn
ywiktjqn
rftnjqpp
yalixnnw
srdsiwgy
pdpdrynx
ioroheqp
vpvvnmad
tqksxfsp
snzxciua
nrhtoskm
crfvapzk
wndbcxvf
syffkzmv
nneibkaf
unuvhnli
ujhdjkvs
gmyqgvdr
jedfxwje
bcshopnu
xgiprhyv
onibkkoq
riguljez
yodzrfeu
ogbwakaa
ymrltbxa
ourmuhrx
yxwixtuv
ptnxdvdm
oskvgexz
fbigwiaw
xctckzmy
khwiyvmw
qbqbtxpr
kavzlngz
bbklqvzt
rwlzppbq
upirhhca
ezlaqdgo
ieuynchi
qmjtojzq
qrricseq
hxkrsfmw
nssfpnws
tiaziudb
rvskpahe
pplmppvi
jxpyidio
teudseap
aclyhavi
yqafhkyd
drjhcqgu
zvfcfbjc
sqfuuezn
gwtsupqk
czakgbiy
wknfzbyj
ooxwycji
wxymanlx
ewbtpqtl
jmwnxydh
ceqdllqb
jhdbejmt
mazzsanu
uypyqlvh
itnrzbie
miuegdjz
tqxeipin
kbareizb
jgjxrycy
epshhech
oicruxsz
ptxgidha
bmgnvjtr
qvwzlmgq
cvwtdffi
ibzasmru
jfenrbjd
nrkgwvcz
hlmghdgd
emhdaicl
wdwrzocv
spwjcrud
dsgilvqn
phvmafqk
iiihsfff
uvcqgtyc
doxkrzzw
hktdpsbv
evqojani
kzapomdx
ewtbrdtb
rgshzyxq
ltinzxld
cazrrlcu
irfxunbt
rmqcsbvm
gddexbsb
qladhkpd
xlvzpmab
wirftlbu
fxfqjubx
sgogtrcb
zlqxxwfy
djgtbihr
gslssgsu
wytydgje
vmovsmdh
ogyiuirh
mtfxzrrx
kcpfbemc
blreqhel
zjsjqqyh
ciqwtpvk
yjcinpaa
wxbxagui
aqbjqmig
ybaeuhew
mjzpnttv
mevjcrqp
fpmgzgco
gklesvof
jzfssvvx
aynfmwhl
euosbnhf
lcebcalt
kvsuuyyt
ltranzur
nlledtpz
vqdrgckr
yodxnjpt
uyznwnni
ckczwqkp
uxtjgoee
otdoyaxg
lbccbfgi
mhzjujrp
cekkthvf
fbvpuhog
nzfannep
rnnqusey
aiocsiyy
uvcbtfwr
bzqirxrg
qnmfgshq
inyevvbn
wswvhglx
huxqxwwb
fdutjnfq
adajhsjk
ahllesij
tcfawzgu
zfdgmtry
byznvpfp
duunxdad
kgadxmdf
ptfaovzv
uhuvlivs
xcoqrmeu
nnnlvmga
zwrbykek
lvpumidd
hieivrnt
vrwqsvci
npbplsvm
ougzcgty
rzvgzooo
iehafkto
rzspzjne
dzvvhvld
fgkmmfda
xjsnnlmd
igvjrsuk
narcempo
xrhoiugu
ghxbpomr
waxtcbcg
tmqgsejx
dobaxhel
mpzgjyww
ehyfvnaz
zxrdlajd
hfquyvok
aqxxdcqv
vjbukram
rjvttibk
pryxgzrd
hcqpxgee
qjgqvoal
wmbuvcty
zpgxmdiu
foequjps
lmdjwyfj
mhqudwzv
lrzkttsw
owyatnru
gwppbbfb
fvlkdsjk
pwhlvjtb
zgldiibp
sokjzgvq
kfourwqm
nfqoyvsz
hdiwmrhk
nnapsbht
blqjjtwy
aknoauti
uhgowkyx
uypyjorh
blfeioot
kzbukpxk
kfmbxgle
zmegahum
upjouzrg
tkedvzfy
bxwxuutn
rrwxobjp
jdujkhox
jkycewdx
ivlbibns
qjshodxf
bektjeou
wotjfgfl
rjrcfiug
aklhubjf
kwpnaezt
lsqvzdom
pxzvorct
vcxazyzs
xsszjsjq
ydgfsukl
gqxpcrla
rvsoxkhy
rschupcm
ivlpikxi
etrnyvkh
byzymjms
qagdcqww
sxnausxs
giuitchj
qgolehtg
keeskeyb

@ -0,0 +1,17 @@
#lang aoc-racket/2016/day06
eedadn
drvtee
eandsr
raavrd
atevrs
tsrnev
sdttsa
rasrtv
nssdts
ntnada
svetve
tesnvt
vntsnd
vrdear
dvrsen
enarar

@ -0,0 +1,19 @@
#lang br/quicklang
(define (read-syntax path port)
(strip-bindings
#`(module mod "day06.rkt"
(solve #,@(string-split (port->string port))))))
(module+ reader (provide read-syntax))
(require sugar/list)
(define (solve . ws)
(define-values (s1 s2)
(for/lists (acc acc2) ([vert-cs (in-list (apply map list (map string->list ws)))])
(define freqs (hash->list (frequency-hash vert-cs)))
(values (car (argmax cdr freqs)) (car (argmin cdr freqs)))))
(displayln (list->string s1))
(displayln (list->string s2)))
(provide solve)
(provide #%module-begin)